firefly-iii/resources/views/reports/partials/categories.twig
2016-10-26 16:54:52 +02:00

42 lines
1.2 KiB
Twig

<table class="table table-hover">
<thead>
<tr>
<th>{{ 'category'|_ }}</th>
<th colspan="2">{{ 'spent'|_ }}</th>
</tr>
</thead>
<tbody>
{% for cat in categories.getCategories %}
{% if loop.index > listLength %}
<tr class="overListLength">
{% else %}
<tr>
{% endif %}
<td>
<a href="{{ route('categories.show',cat.id) }}">{{ cat.name }}</a>
</td>
<td>{{ cat.spent|formatAmount }}</td>
<td style="width:20px;">
<i class="fa fa-fw fa-info-circle text-muted firefly-info-button"
data-location="category-entry" data-category-id="{{ cat.id }}"
></i>
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
{% if categories.getCategories.count > expenseTopLength %}
<tr>
<td colspan="2" class="active">
<a href="#" class="listLengthTrigger">{{ trans('firefly.show_full_list',{number:incomeTopLength}) }}</a>
</td>
</tr>
{% endif %}
<tr>
<td><em>{{ 'sum'|_ }}</em></td>
<td>{{ categories.getTotal|formatAmount }}</td>
</tr>
</tfoot>
</table>