Various cosmetic fixes for /all lists [skip ci]

This commit is contained in:
James Cole
2017-04-16 12:51:21 +02:00
parent f0dab5bdb9
commit 20a30a2d1d
10 changed files with 146 additions and 122 deletions

View File

@@ -73,7 +73,7 @@
</div>
<div class="box-body">
{% include 'list.journals-tasker' with {hideCategories: true} %}
{% if entries %}
{% if periods %}
<p>
<i class="fa fa-calendar" aria-hidden="true"></i>
<a href="{{ route('categories.show', [category.id,'all']) }}">
@@ -94,34 +94,42 @@
{% if periods.count > 0 %}
<div class="col-lg-2 col-md-4 col-sm-12 col-xs-12">
{% for period in periods %}
<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('categories.show',[category.id,period.string]) }}">{{ period.name }}</a>
</h3>
{% if period.spent != 0 or period.earned != 0 or period.sum != 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('categories.show',[category.id,period.string]) }}">{{ period.name }}</a>
</h3>
</div>
<div class="box-body no-padding">
<table class="table table-hover">
{% if period.spent != 0 %}
<tr>
<td style="width:33%;">{{ 'spent'|_ }}</td>
<td style="text-align: right;">{{ period.spent|formatAmount }}</td>
</tr>
{% endif %}
{% if period.earned != 0 %}
<tr>
<td style="width:33%;">{{ 'earned'|_ }}</td>
<td style="text-align: right;">{{ period.earned|formatAmount }}</td>
</tr>
{% endif %}
{% if period.earned != 0 and period.spent != 0 %}
<tr>
<td style="width:33%;">{{ 'sum'|_ }}</td>
<td style="text-align: right;">{{ period.sum|formatAmount }}</td>
</tr>
{% endif %}
{% if period.transferred != 0 %}
<tr>
<td style="width:33%;">{{ 'transferred'|_ }}</td>
<td style="text-align: right;" class="text-info">{{ period.transferred|formatAmountPlain }}</td>
</tr>
{% endif %}
</table>
</div>
</div>
<div class="box-body no-padding">
<table class="table table-hover">
<tr>
<td style="width:33%;">{{ 'spent'|_ }}</td>
<td style="text-align: right;">{{ period.spent|formatAmount }}</td>
</tr>
<tr>
<td style="width:33%;">{{ 'earned'|_ }}</td>
<td style="text-align: right;">{{ period.earned|formatAmount }}</td>
</tr>
{% if period.earned != 0 and period.spent != 0 %}
<tr>
<td style="width:33%;">{{ 'sum'|_ }}</td>
<td style="text-align: right;">{{ period.sum|formatAmount }}</td>
</tr>
{% endif %}
<tr>
<td style="width:33%;">{{ 'transferred'|_ }}</td>
<td style="text-align: right;" class="text-info">{{ period.transferred|formatAmountPlain }}</td>
</tr>
</table>
</div>
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}