Files
firefly-iii/resources/views/popup/list/journals.twig

91 lines
3.1 KiB
Twig
Raw Normal View History

2016-04-01 16:06:55 +02:00
<table class="table table-hover table-condensed">
<thead>
<tr>
<th>&nbsp;</th>
<th>{{ trans('list.description') }}</th>
<th>{{ trans('list.amount') }}</th>
<th class="hidden-sm hidden-xs">{{ trans('list.date') }}</th>
2016-04-03 14:01:27 +02:00
{% if not hideSource %}
<th class="hidden-xs">{{ trans('list.from') }}</th>
{% endif %}
{% if not hideDestination %}
2016-04-03 14:38:12 +02:00
<th class="hidden-xs">{{ trans('list.to') }}</th>
2016-04-03 14:01:27 +02:00
{% endif %}
2016-04-01 16:06:55 +02:00
<!-- Hide budgets? -->
2016-04-03 14:01:27 +02:00
{% if not hideBudget %}
2016-04-01 16:06:55 +02:00
<th class="hidden-xs"><i class="fa fa-tasks fa-fw" title="{{ trans('list.budget') }}"></i></th>
{% endif %}
<!-- Hide categories? -->
2016-04-03 14:01:27 +02:00
{% if not hideCategory %}
2016-04-01 16:06:55 +02:00
<th class="hidden-xs"><i class="fa fa-bar-chart fa-fw" title="{{ trans('list.category') }}"></i></th>
{% endif %}
</tr>
</thead>
<tbody>
2016-04-03 14:38:12 +02:00
<!--
Make sum:
{% set sum = 0 %}
-->
2016-04-01 16:06:55 +02:00
{% for journal in journals %}
2016-04-03 14:38:12 +02:00
<!-- add to sum
{% set sum = (sum + getAmount(journal) ) %}
-->
2016-04-01 16:06:55 +02:00
<tr class="drag" data-date="{{ journal.date.format('Y-m-d') }}" data-id="{{ journal.id }}">
<td class="hidden-xs">
{{ journal|typeIcon }}
</td>
<td>
<a href="{{ route('transactions.show',journal.id) }}" title="{{ journal.description }}">{{ journal.description }}</a>
</td>
<td>
2016-05-14 23:14:49 +02:00
{% if not accountPerspective %}
{{ journal|formatJournal }}
{% else %}
{{ formatPerspective(journal, accountPerspective)|raw }}
{% endif %}
2016-04-01 16:06:55 +02:00
</td>
<td class="hidden-sm hidden-xs">
{{ journal.date.formatLocalized(monthAndDayFormat) }}
</td>
2016-04-03 14:01:27 +02:00
{% if not hideSource %}
2016-04-03 14:38:12 +02:00
<td class="hidden-xs">
2016-05-14 23:14:49 +02:00
{{ sourceAccount(journal)|raw }}
2016-04-03 14:38:12 +02:00
</td>
2016-04-03 14:01:27 +02:00
{% endif %}
{% if not hideDestination %}
2016-04-03 14:38:12 +02:00
<td class="hidden-xs">
2016-05-14 23:14:49 +02:00
{{ destinationAccount(journal)|raw }}
2016-04-03 14:38:12 +02:00
</td>
2016-04-03 14:01:27 +02:00
{% endif %}
2016-04-01 16:06:55 +02:00
<!-- Do NOT hide the budget? -->
2016-04-03 14:01:27 +02:00
{% if not hideBudget %}
2016-04-01 16:06:55 +02:00
<td class="hidden-xs">
{% if journal.budgets[0] %}
<a href="{{ route('budgets.show',journal.budgets[0].id) }}">{{ journal.budgets[0].name }}</a>
{% endif %}
</td>
{% endif %}
<!-- Do NOT hide the category? -->
2016-04-03 14:01:27 +02:00
{% if not hideCategory %}
2016-04-01 16:06:55 +02:00
<td class="hidden-xs">
{% if journal.categories[0] %}
<a href="{{ route('categories.show',journal.categories[0].id) }}">{{ journal.categories[0].name }}</a>
{% endif %}
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
2016-04-03 14:38:12 +02:00
<tfoot>
<tr>
<td colspan="2" style="text-align: right;"><em>{{ 'sum'|_ }}:</em></td>
<td>{{ sum|formatAmount }}</td>
</tr>
</tfoot>
2016-04-01 16:06:55 +02:00
</table>
{{ journals.render|raw }}