mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Refactor period blocks.
This commit is contained in:
44
resources/views/list/periods.twig
Normal file
44
resources/views/list/periods.twig
Normal file
@@ -0,0 +1,44 @@
|
||||
{% for period in periods %}
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><a href="{{ period.route }}">{{ period.title }}</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-hover">
|
||||
{% if period.transactions > 0 %}
|
||||
<tr>
|
||||
<td style="width:33%;">{{ 'transactions'|_ }}</td>
|
||||
<td style="text-align: right;">{{ period.transactions }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% for arr in period.spent %}
|
||||
{% if arr.amount !=0 %}
|
||||
<tr>
|
||||
<td style="width:33%;">{{ 'spent'|_ }}</td>
|
||||
<td style="text-align: right;">{{ formatAmountByCurrency(arr.currency, arr.amount) }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for arr in period.earned %}
|
||||
{% if arr.amount !=0 %}
|
||||
<tr>
|
||||
<td style="width:33%;">{{ 'earned'|_ }}</td>
|
||||
<td style="text-align: right;">{{ formatAmountByCurrency(arr.currency, arr.amount) }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for arr in period.transferred %}
|
||||
{% if arr.amount !=0 %}
|
||||
<tr>
|
||||
<td style="width:33%;">{{ 'transferred'|_ }}</td>
|
||||
<td style="text-align: right;"><span class="text-info">{{ formatAmountByCurrency(arr.currency, arr.amount, false) }}</span></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user