firefly-iii/resources/views/list/accounts.twig
2016-03-14 17:18:28 +01:00

62 lines
2.9 KiB
Twig

<table class="table table-hover sortable">
<thead>
<tr>
<th class="hidden-sm hidden-xs" data-defaultsort="disabled">&nbsp;</th>
<th>{{ trans('list.name') }}</th>
{% if what == 'asset' %}
<th class="hidden-sm hidden-xs">{{ trans('list.role') }}</th>
{% endif %}
<th class="hidden-sm hidden-xs">{{ trans('list.iban') }}</th>
<th>{{ trans('list.currentBalance') }}</th>
<th class="hidden-sm hidden-xs">{{ trans('list.active') }}</th>
<th class="hidden-sm hidden-xs">{{ trans('list.lastActivity') }}</th>
<th class="hidden-sm hidden-xs">{{ trans('list.balanceDiff', {'start' : Session.get('start').formatLocalized(monthAndDayFormat),'end' : Session.get('end').formatLocalized(monthAndDayFormat)}) }}</th>
</tr>
</thead>
<tbody>
{% for account in accounts %}
<tr>
<td class="hidden-sm hidden-xs">
<div class="btn-group btn-group-xs">
<a class="btn btn-default btn-xs" href="{{ route('accounts.edit',account.id) }}"><i class="fa fa-fw fa-pencil"></i></a>
<a class="btn btn-danger btn-xs" href="{{ route('accounts.delete',account.id) }}"><i class="fa fa-fw fa-trash-o"></i></a>
</div>
</td>
<td><a href="{{ route('accounts.show',account.id) }}">{{ account.name }}</a></td>
{% if what == "asset" %}
<td class="hidden-sm hidden-xs">
{% for entry in account.accountmeta %}
{% if entry.name == 'accountRole' %}
{{ entry.data|getAccountRole }}
{% endif %}
{% endfor %}
</td>
{% endif %}
<td class="hidden-sm hidden-xs">{{ account.iban }}</td>
<td data-value="{{ account.endBalance }}">{{ account.endBalance|formatAmount }}</td>
<td class="hidden-sm hidden-xs" data-value="{{ account.active }}">
{% if account.active %}
<i class="fa fa-fw fa-check"></i>
{% else %}
<i class="fa fa-fw fa-ban"></i>
{% endif %}
</td>
{% if account.lastActivityDate %}
<td class="hidden-sm hidden-xs" data-value="{{ account.lastActivityDate.format('U') }} ">
{{ account.lastActivityDate.formatLocalized(monthAndDayFormat) }}
</td>
{% else %}
<td class="hidden-sm hidden-xs" data-value="0">
<em>{{ 'never'|_ }}</em>
</td>
{% endif %}
<td class="hidden-sm hidden-xs" data-value="{{ account.endBalance - account.startBalance }}">
{{ (account.endBalance - account.startBalance)|formatAmount }}
</td>
</tr>
{% endfor %}
</tbody>
</table>