Optimized some views and fixed tests for #595

This commit is contained in:
James Cole
2017-03-10 18:54:50 +01:00
parent ebc712f6b5
commit 0c52d54d7d
7 changed files with 49 additions and 23 deletions

View File

@@ -1,7 +1,9 @@
{% extends "./layout/default" %}
{% block breadcrumbs %}
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute().getName(), account) }}
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, account) }}
{{ Route.getCurrentRoute.getName }}
{% endblock %}
{% block content %}

View File

@@ -41,16 +41,20 @@
{% if periods.count > 0 %}
<div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
{% for entry in periods %}
<div class="box {% if entry[3] == start %}box-solid box-primary{% endif %}">
<div class="box {% if entry.date == start %}box-solid box-primary{% endif %}">
<div class="box-header with-border">
<h3 class="box-title"><a href="{{ route('budgets.no-budget',[entry[0]]) }}">{{ entry[1] }}</a>
<h3 class="box-title"><a href="{{ route('budgets.no-budget',[entry.string]) }}">{{ entry.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;">{{ entry[2] }}</td>
<td style="text-align: right;">{{ entry.count }}</td>
</tr>
<tr>
<td style="width:33%;">{{ 'sum'|_ }}</td>
<td style="text-align: right;">{{ entry.sum|formatAmount }}</td>
</tr>
</table>
</div>