Refactor period blocks.

This commit is contained in:
James Cole
2018-09-10 20:24:19 +02:00
parent d77112955d
commit efeffaa49f
10 changed files with 207 additions and 167 deletions

View File

@@ -42,28 +42,7 @@
{% if periods.count > 0 %}
<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
{% for period in periods %}
{% if period.count > 0 %}
<div class="box {% if period.date == start %}box-solid box-primary{% endif %}">
<div class="box-header with-border">
<h3 class="box-title"><a href="{{ route('budgets.no-budget',[period.start.format('Y-m-d'), period.end.format('Y-m-d')]) }}">{{ period.name }}</a>
</h3>
</div>
<div class="box-body no-padding">
<table class="table table-hover">
<tr>
<td style="width:33%;">{{ 'transactions'|_ }}</td>
<td style="text-align: right;">{{ period.count }}</td>
</tr>
<tr>
<td style="width:33%;">{{ 'spent'|_ }}</td>
<td style="text-align: right;">{{ period.sum|formatAmount }}</td>
</tr>
</table>
</div>
</div>
{% endif %}
{% endfor %}
{% include 'list.periods' %}
</div>
{% endif %}