Add more stuff to ajax controllers, making report controller simpler.

This commit is contained in:
James Cole
2016-10-26 16:46:43 +02:00
parent 01de147900
commit fe3f015171
9 changed files with 158 additions and 22 deletions

View File

@@ -39,9 +39,8 @@
<!-- budgets -->
{% include 'reports/partials/budgets.twig' %}
</div>
<div class="col-lg-4 col-md-4 col-sm-12">
<!-- categories -->
{% include 'reports/partials/categories.twig' %}
<div class="col-lg-4 col-md-4 col-sm-12 loading" id="categoryReport">
{# {% include 'reports/partials/categories.twig' %} #}
</div>
</div>
<div class="row">
@@ -82,6 +81,7 @@
<!-- some URL's -->
var accountReportUrl = '{{ route('reports.data.accountReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
var inOutReportUrl = '{{ route('reports.data.inOutReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
var categoryReportUrl = '{{ route('reports.data.categoryReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
</script>
<script type="text/javascript" src="js/ff/reports/default/all.js"></script>
<script type="text/javascript" src="js/ff/reports/default/month.js"></script>

View File

@@ -12,7 +12,11 @@
</thead>
<tbody>
{% for cat in categories.getCategories %}
<tr>
{% if loop.index > listLength %}
<tr class="overListLength">
{% else %}
<tr>
{% endif %}
<td>
<a href="{{ route('categories.show',cat.id) }}">{{ cat.name }}</a>
</td>
@@ -26,6 +30,14 @@
{% endfor %}
</tbody>
<tfoot>
{% if categories.getCategories.count > expenseTopLength %}
<tr>
<td colspan="2" class="active">
<a href="#" class="listLengthTrigger">{{ trans('firefly.show_full_list',{number:incomeTopLength}) }}</a>
</td>
</tr>
{% endif %}
<tr>
<td><em>{{ 'sum'|_ }}</em></td>
<td>{{ categories.getTotal|formatAmount }}</td>