mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-08 15:05:29 +00:00
Join two charts, simpler code.
This commit is contained in:
@@ -2,19 +2,19 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'budget'|_ }}</th>
|
||||
{% for year in years %}
|
||||
<th>{{ year }}</th>
|
||||
{% for period in periods %}
|
||||
<th>{{ period }}</th>
|
||||
{% endfor %}
|
||||
<th>{{ 'sum'|_ }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for id, info in budgetMultiYear %}
|
||||
{% for id, info in budgets %}
|
||||
<tr>
|
||||
<td>
|
||||
(<a title="{{ info.name }}" href="#" data-budget="{{ id }}" class="budget-chart-activate">{{ info.name }}</a>)
|
||||
{% if id == 0 %}
|
||||
<a href="{{ route('budgets.noBudget') }}">{{ info.name }}</a>
|
||||
|
||||
{% else %}
|
||||
<a href="{{ route('budgets.show', id) }}">{{ info.name }}</a>
|
||||
{% endif %}
|
||||
@@ -1,25 +0,0 @@
|
||||
<table class="table table-condensed table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
{% for date, header in budgets.get('headers') %}
|
||||
<th>{{ header }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% set spentData = budgets.get('spent') %}
|
||||
{% for budgetId, budgetName in budgets.get('budgets') %}
|
||||
<tr>
|
||||
<th>
|
||||
<a title="{{ budgetName }}" href="#" data-budget="{{ budgetId }}" class="budget-chart-activate">{{ budgetName }}</a>
|
||||
</th>
|
||||
{% for date, header in budgets.get('headers') %}
|
||||
<td>{{ spentData[budgetId][date]|formatAmount }}</td>
|
||||
{% endfor %}
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
Reference in New Issue
Block a user