Files
firefly-iii/resources/views/v1/list/accounts.twig

95 lines
4.9 KiB
Twig
Raw Normal View History

<div style="padding-left:8px;">
{{ accounts.render|raw }}
</div>
2015-06-20 07:48:44 +02:00
<table class="table table-hover sortable">
2015-05-01 22:44:35 +02:00
<thead>
<tr>
2016-03-14 17:18:28 +01:00
<th class="hidden-sm hidden-xs" data-defaultsort="disabled">&nbsp;</th>
2016-11-20 15:30:16 +01:00
<th data-defaultsign="az">{{ trans('list.name') }}</th>
2019-06-22 10:25:34 +02:00
{% if objectType == 'asset' %}
2017-06-30 07:17:25 +02:00
<th data-defaultsign="az" class="hidden-sm hidden-xs hidden-md">{{ trans('list.role') }}</th>
2015-05-01 22:44:35 +02:00
{% endif %}
2019-06-22 10:25:34 +02:00
{% if objectType == 'liabilities' %}
2018-08-05 18:59:15 +02:00
<th data-defaultsign="az">{{ trans('list.liability_type') }}</th>
<th data-defaultsign="_19">{{ trans('list.interest') }} ({{ trans('list.interest_period') }})</th>
{% endif %}
<th data-defaultsign="az" class="hidden-sm hidden-xs">{{ trans('form.account_number') }}</th>
2016-11-20 15:30:16 +01:00
<th data-defaultsign="_19">{{ trans('list.currentBalance') }}</th>
2015-06-25 17:06:20 +02:00
<th class="hidden-sm hidden-xs">{{ trans('list.active') }}</th>
2018-08-05 18:59:15 +02:00
{# hide last activity to make room for other stuff #}
2019-06-22 10:25:34 +02:00
{% if objectType != 'liabilities' %}
2018-08-05 18:59:15 +02:00
<th data-defaultsign="month" class="hidden-sm hidden-xs hidden-md">{{ trans('list.lastActivity') }}</th>
{% endif %}
2017-12-03 09:01:39 +01:00
<th data-defaultsign="_19" style="width:15%;"
class="hidden-sm hidden-xs hidden-md">{{ trans('list.balanceDiff') }}</th>
2015-05-01 22:44:35 +02:00
</tr>
</thead>
<tbody>
{% for account in accounts %}
<tr>
2016-03-14 17:18:28 +01:00
<td class="hidden-sm hidden-xs">
2017-12-29 09:05:35 +01:00
<div class="btn-group btn-group-xs edit_tr_buttons"><a class="btn btn-default btn-xs" title="{{ 'edit'|_ }}"
href="{{ route('accounts.edit',account.id) }}"><i
2019-06-22 10:25:34 +02:00
class="fa fa-fw fa-pencil"></i></a>{% if objectType == 'asset' %}<a class="btn btn-default btn-xs"
2017-12-29 09:05:35 +01:00
title="{{ 'reconcile_this_account'|_ }}"
href="{{ route('accounts.reconcile',account.id) }}"><i
class="fa fa-fw fa-check"></i></a>{% endif %}<a class="btn btn-danger btn-xs" title="{{ 'delete'|_ }}"
href="{{ route('accounts.delete',account.id) }}"><i
class="fa fa-fw fa-trash-o"></i></a></div>
2015-05-01 22:44:35 +02:00
</td>
2016-11-20 17:36:11 +01:00
<td data-value="{{ account.name }}"><a href="{{ route('accounts.show',account.id) }}">{{ account.name }}</a></td>
2019-06-22 10:25:34 +02:00
{% if objectType == "asset" %}
2017-06-30 07:17:25 +02:00
<td class="hidden-sm hidden-xs hidden-md">
2015-05-01 22:44:35 +02:00
{% for entry in account.accountmeta %}
{% if entry.name == 'account_role' %}
2017-01-21 09:07:10 +01:00
{{ ('account_role_'~entry.data)|_ }}
2015-05-01 22:44:35 +02:00
{% endif %}
{% endfor %}
</td>
{% endif %}
2019-06-22 10:25:34 +02:00
{% if objectType == 'liabilities' %}
2018-08-05 18:59:15 +02:00
<td>{{ account.accountTypeString }}</td>
<td data-value="{{ account.interest }}">
{{ account.interest }}% ({{ account.interestPeriod|lower }})
</td>
{% endif %}
<td class="hidden-sm hidden-xs">{{ account.iban }}{% if account.iban == '' %}{{ accountGetMetaField(account, 'account_number') }}{% endif %}</td>
2017-01-02 19:27:27 +01:00
<td data-value="{{ account.endBalance }}" style="text-align: right;">
<span style="margin-right:5px;">
{{ formatAmountByAccount(account, account.endBalance) }}
2017-01-02 19:27:27 +01:00
</span>
</td>
2015-06-27 08:06:24 +02:00
<td class="hidden-sm hidden-xs" data-value="{{ account.active }}">
2015-05-01 22:44:35 +02:00
{% if account.active %}
<i class="fa fa-fw fa-check"></i>
{% else %}
<i class="fa fa-fw fa-ban"></i>
{% endif %}
</td>
2018-08-05 18:59:15 +02:00
{# hide last activity to make room for other stuff #}
2019-06-22 10:25:34 +02:00
{% if objectType != 'liabilities' %}
2018-08-05 18:59:15 +02:00
{% if account.lastActivityDate %}
<td class="hidden-sm hidden-xs hidden-md" data-value="{{ account.lastActivityDate.format('Y-m-d H-i-s') }} ">
{{ account.lastActivityDate.formatLocalized(monthAndDayFormat) }}
</td>
{% else %}
<td class="hidden-sm hidden-xs hidden-md" data-value="0000-00-00 00-00-00">
<em>{{ 'never'|_ }}</em>
</td>
{% endif %}
2015-05-01 22:44:35 +02:00
{% endif %}
2017-06-30 07:17:25 +02:00
<td class="hidden-sm hidden-xs hidden-md" data-value="{{ account.difference }}" style="text-align: right;">
2017-01-02 19:27:27 +01:00
<span style="margin-right:5px;">
{{ formatAmountByAccount(account, account.difference) }}
2017-01-02 19:27:27 +01:00
</span>
2015-05-01 22:44:35 +02:00
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div style="padding-left:8px;">
{{ accounts.render|raw }}
2017-12-22 18:32:43 +01:00
</div>