firefly-iii/resources/twig/list/accounts.twig

60 lines
2.4 KiB
Twig
Raw Normal View History

2015-06-20 00:48:44 -05:00
<table class="table table-hover sortable">
2015-05-01 15:44:35 -05:00
<thead>
<tr>
<th data-defaultsort="disabled">&nbsp;</th>
2015-05-14 06:00:43 -05:00
<th>{{ trans('list.name') }}</th>
2015-05-01 15:44:35 -05:00
{% if what == 'asset' %}
2015-05-14 06:00:43 -05:00
<th>{{ trans('list.role') }}</th>
2015-05-01 15:44:35 -05:00
{% endif %}
2015-05-14 06:00:43 -05:00
<th>{{ trans('list.currentBalance') }}</th>
<th>{{ trans('list.active') }}</th>
<th>{{ trans('list.lastActivity') }}</th>
2015-05-14 11:00:56 -05:00
<th>{{ trans('list.balanceDiff', {'start' : Session.get('start').formatLocalized(monthAndDayFormat),'end' : Session.get('end').formatLocalized(monthAndDayFormat)}) }}</th>
2015-05-01 15:44:35 -05:00
</tr>
</thead>
<tbody>
{% for account in accounts %}
<tr>
<td>
<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>
{% for entry in account.accountmeta %}
{% if entry.name == 'accountRole' %}
{{ entry.data|getAccountRole }}
{% endif %}
{% endfor %}
</td>
{% endif %}
<td data-value="{{ account|balance }}">{{ account|balance|formatAmount }}</td>
<td 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 data-value="{{ account.lastActivityDate.format('U') }} ">
2015-05-14 11:00:56 -05:00
{{ account.lastActivityDate.formatLocalized(monthAndDayFormat) }}
2015-05-01 15:44:35 -05:00
</td>
{% else %}
<td data-value="0">
<em>Never</em>
</td>
{% endif %}
<td data-value="{{account.endBalance - account.startBalance}}">
{{ (account.endBalance - account.startBalance)|formatAmount }}
</td>
</tr>
{% endfor %}
</tbody>
</table>