mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Add sorting to a report table [skip ci]
This commit is contained in:
parent
4b3c31a11a
commit
04c59304da
@ -1,45 +1,59 @@
|
|||||||
<table class="table table-hover">
|
<table class="table table-hover sortable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{ 'budget'|_ }}</th>
|
<th data-defaultsign="az">{{ 'budget'|_ }}</th>
|
||||||
<th class="hidden-xs">{{ 'date'|_ }}</th>
|
<th data-defaultsign="month" class="hidden-xs">{{ 'date'|_ }}</th>
|
||||||
<th>{{ 'budgeted'|_ }}</th>
|
<th data-defaultsign="_19">{{ 'budgeted'|_ }}</th>
|
||||||
<th>{{ 'spent'|_ }}</th>
|
<th data-defaultsign="_19">{{ 'spent'|_ }}</th>
|
||||||
<th>{{ 'left'|_ }}</th>
|
<th data-defaultsign="_19">{{ 'left'|_ }}</th>
|
||||||
<th>{{ 'overspent'|_ }}</th>
|
<th data-defaultsign="_19">{{ 'overspent'|_ }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for budgetLine in budgets.getBudgetLines %}
|
{% for budgetLine in budgets.getBudgetLines %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
|
||||||
{% if budgetLine.getBudget.id %}
|
{% if budgetLine.getBudget.id %}
|
||||||
|
<td data-value="{{ budgetLine.getBudget.name }}">
|
||||||
<a href="{{ route('budgets.show',budgetLine.getBudget.id) }}">{{ budgetLine.getBudget.name }}</a>
|
<a href="{{ route('budgets.show',budgetLine.getBudget.id) }}">{{ budgetLine.getBudget.name }}</a>
|
||||||
{% else %}
|
|
||||||
<em>{{ 'no_budget'|_ }}</em>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
</td>
|
||||||
<td class="hidden-xs">
|
{% else %}
|
||||||
|
<td data-value="zzzzzzz">
|
||||||
|
<em>{{ 'no_budget'|_ }}</em>
|
||||||
|
</td>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{% if budgetLine.getRepetition.id %}
|
{% if budgetLine.getRepetition.id %}
|
||||||
|
<td class="hidden-xs" data-value="{{ budgetLine.getRepetition.startdate.format('Y-m-d') }}">
|
||||||
<a href="{{ route('budgets.showWithRepetition', [budgetLine.getBudget.id, budgetLine.getRepetition.id]) }}">
|
<a href="{{ route('budgets.showWithRepetition', [budgetLine.getBudget.id, budgetLine.getRepetition.id]) }}">
|
||||||
{{ budgetLine.getRepetition.startdate.formatLocalized(monthAndDayFormat) }}
|
{{ budgetLine.getRepetition.startdate.formatLocalized(monthAndDayFormat) }}
|
||||||
—
|
—
|
||||||
{{ budgetLine.getRepetition.enddate.formatLocalized(monthAndDayFormat) }}
|
{{ budgetLine.getRepetition.enddate.formatLocalized(monthAndDayFormat) }}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
{% if budgetLine.getRepetition.id %}
|
|
||||||
{{ budgetLine.getRepetition.amount|formatAmount }}
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ 0|formatAmount }}
|
<td data-value="0000-00-00">
|
||||||
{% endif %}
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
{% if budgetLine.getRepetition.id %}
|
||||||
|
<td data-value="{{ budgetLine.getRepetition.amount }}">
|
||||||
|
{{ budgetLine.getRepetition.amount|formatAmount }}
|
||||||
|
</td>
|
||||||
|
{% else %}
|
||||||
|
<td data-value="0">
|
||||||
|
{{ 0|formatAmount }}
|
||||||
|
</td>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<td data-value="{{ budgetLine.getSpent }}">
|
||||||
{% if budgetLine.getSpent != 0 %}
|
{% if budgetLine.getSpent != 0 %}
|
||||||
{{ budgetLine.getSpent|formatAmount }} <i class="fa fa-fw text-muted fa-info-circle firefly-info-button"
|
{{ budgetLine.getSpent|formatAmount }}
|
||||||
data-location="budget-spent-amount" data-budget-id="{{ budgetLine.getBudget.id }}"
|
<i class="fa fa-fw text-muted fa-info-circle firefly-info-button"
|
||||||
></i>
|
data-location="budget-spent-amount" data-budget-id="{{ budgetLine.getBudget.id }}"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if budgetLine.getSpent == 0 %}
|
{% if budgetLine.getSpent == 0 %}
|
||||||
@ -47,12 +61,12 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td data-value="{{ budgetLine.getLeft }}">
|
||||||
{% if(budgetLine.getOverspent == 0) %}
|
{% if(budgetLine.getOverspent == 0) %}
|
||||||
{{ budgetLine.getLeft|formatAmount }}
|
{{ budgetLine.getLeft|formatAmount }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td data-value="{{ budgetLine.getOverspent }}">
|
||||||
{% if budgetLine.getOverspent != 0 %}
|
{% if budgetLine.getOverspent != 0 %}
|
||||||
{{ budgetLine.getOverspent|formatAmount }}
|
{{ budgetLine.getOverspent|formatAmount }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user