Also implement #595 for the no-cat view.

This commit is contained in:
James Cole
2017-03-10 19:34:46 +01:00
parent 0c52d54d7d
commit ecbd7ca95b
7 changed files with 315 additions and 28 deletions

View File

@@ -22,7 +22,7 @@
<h3 class="box-title">{{ subTitle }}</h3>
</div>
<div class="box-body ">
{% include 'list.journals-tasker' with {'journals': journals} %}
{% include 'list.journals-tasker' with {'journals': journals,'hideBudgets': true} %}
{% if periods.count > 0 %}
<p>
<i class="fa fa-calendar" aria-hidden="true"></i>
@@ -53,7 +53,7 @@
<td style="text-align: right;">{{ entry.count }}</td>
</tr>
<tr>
<td style="width:33%;">{{ 'sum'|_ }}</td>
<td style="width:33%;">{{ 'spent'|_ }}</td>
<td style="text-align: right;">{{ entry.sum|formatAmount }}</td>
</tr>
</table>

View File

@@ -1,23 +1,86 @@
{% extends "./layout/default" %}
{% block breadcrumbs %}
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, subTitle) }}
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, moment, start, end) }}
{% endblock %}
{% block content %}
{# upper show-all instruction #}
{% if periods.count > 0 %}
<div class="row">
<div class="col-lg-offset-10 col-lg-2 col-md-offset-10 col-md-2 col-sm-12 col-xs-12">
<p class="small text-center"><a href="{{ route('categories.no-category',['all']) }}">{{ 'showEverything'|_ }}</a></p>
</div>
</div>
{% endif %}
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="{% if periods.count > 0 %}col-lg-10 col-md-10 col-sm-12{% else %}col-lg-12 col-md-12 col-sm-12{% endif %}">
<div class="box">
<div class="box-header with-border">
{{ subTitle }}
<h3 class="box-title">{{ subTitle }}</h3>
</div>
<div class="box-body">
{% include 'list.journals-tasker' %}
<div class="box-body ">
{% include 'list.journals-tasker' with {'journals': journals, 'hideCategories':true} %}
{% if periods.count > 0 %}
<p>
<i class="fa fa-calendar" aria-hidden="true"></i>
<a href="{{ route('categories.no-category', ['all']) }}">{{ 'show_all_no_filter'|_ }}</a>
</p>
{% else %}
<p>
<i class="fa fa-calendar" aria-hidden="true"></i>
<a href="{{ route('categories.no-category') }}">{{ 'show_the_current_period_and_overview'|_ }}</a>
</p>
{% endif %}
</div>
</div>
</div>
{% 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.date == start %}box-solid box-primary{% endif %}">
<div class="box-header with-border">
<h3 class="box-title"><a href="{{ route('categories.no-category',[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.count }}</td>
</tr>
<tr>
<td style="width:33%;">{{ 'spent'|_ }}</td>
<td style="text-align: right;">{{ entry.spent|formatAmount }}</td>
</tr>
<tr>
<td style="width:33%;">{{ 'earned'|_ }}</td>
<td style="text-align: right;">{{ entry.earned|formatAmount }}</td>
</tr>
<tr>
<td style="width:33%;">{{ 'transferred'|_ }}</td>
<td style="text-align: right;" class="text-info">{{ entry.transferred|formatAmountPlain }}</td>
</tr>
</table>
</div>
</div>
{% endfor %}
</div>
{% endif %}
</div>
{# lower show-all instruction #}
{% if periods.count > 0 %}
<div class="row">
<div class="col-lg-offset-10 col-lg-2 col-md-offset-10 col-md-2 col-sm-12 col-xs-12">
<p class="small text-center"><a href="{{ route('categories.no-category',['all']) }}">{{ 'showEverything'|_ }}</a></p>
</div>
</div>
{% endif %}
{% endblock %}
{% block scripts %}