More support for #142

This commit is contained in:
James Cole
2016-05-15 09:00:49 +02:00
parent 446ab62d38
commit 626404407e
9 changed files with 697 additions and 443 deletions

View File

@@ -76,18 +76,14 @@
<!-- Do NOT hide the budget? -->
{% if not hideBudgets %}
<td class="hidden-xs">
{% if journal.budgets[0] %}
<a href="{{ route('budgets.show',journal.budgets[0].id) }}">{{ journal.budgets[0].name }}</a>
{% endif %}
{{ journalBudgets(journal)|raw }}
</td>
{% endif %}
<!-- Do NOT hide the category? -->
{% if not hideCategories %}
<td class="hidden-xs">
{% if journal.categories[0] %}
<a href="{{ route('categories.show',journal.categories[0].id) }}">{{ journal.categories[0].name }}</a>
{% endif %}
{{ journalCategories(journal)|raw }}
</td>
{% endif %}

View File

@@ -62,15 +62,14 @@
<!-- Do NOT hide the budget? -->
{% if not hideBudget %}
<td class="hidden-xs">
{% if journal.budgets[0] %}
<a href="{{ route('budgets.show',journal.budgets[0].id) }}">{{ journal.budgets[0].name }}</a>
{% endif %}
{{ journalBudgets(journal)|raw }}
</td>
{% endif %}
<!-- Do NOT hide the category? -->
{% if not hideCategory %}
<td class="hidden-xs">
{{ journalCategories(journal)|raw }}
{% if journal.categories[0] %}
<a href="{{ route('categories.show',journal.categories[0].id) }}">{{ journal.categories[0].name }}</a>
{% endif %}

View File

@@ -62,17 +62,12 @@
{% endif %}
</td>
{% if journal.budgets[0] %}
<td class="hide-budget"><a href="{{ route('budgets.show',journal.budgets[0].id) }}">{{ journal.budgets[0].name }}</a></td>
{% else %}
<td class="hide-budget"><em>{{ 'no_budget'|_ }}</em></td>
{% endif %}
{% if journal.categories[0] %}
<td class="hide-category"><a href="{{ route('categories.show',journal.categories[0].id) }}">{{ journal.categories[0].name }}</a></td>
{% else %}
<td class="hide-category"><em>{{ 'no_category'|_ }}</em></td>
{% endif %}
<td class="hide-budget">
{{ journalBudgets(journal)|raw }}
</td>
<td class="hide-category">
{{ journalCategories(journal)|raw }}
</td>
{% if journal.bill_id %}
<td class="hide-bill"><i class="fa fa-fw fa-rotate-right" title="{{ trans('list.bill') }}"></i>&nbsp;<a
href="{{ route('bills.show',journal.bill_id) }}">{{ journal.bill.name }}</a></td>

View File

@@ -172,7 +172,7 @@
</tr>
<tr>
<td>{{ 'amount'|_ }}</td>
<td>{{ t.before|formatAmount}}</td>
<td>{{ t.before|formatAmount }}</td>
</tr>
<tr>
<td>{{ 'newBalance'|_ }}</td>
@@ -184,22 +184,18 @@
<td>{{ t.description }}</td>
</tr>
{% endif %}
{% if t.categories[0] %}
<tr>
<td>{{ 'category'|_ }}</td>
<td>
<a href="{{ route('categories.show',t.categories[0].id) }}">{{ t.categories[0].name }}</a>
</td>
</tr>
{% endif %}
{% if t.budgets[0] %}
<tr>
<td>{{ 'budget'|_ }}</td>
<td>
<a href="{{ route('budgets.show',t.budgets[0].id) }}">{{ t.budgets[0].name }}</a>
</td>
</tr>
{% endif %}
<tr>
<td>{{ 'category'|_ }}</td>
<td>
{{ transactionCategories(t)|raw }}
</td>
</tr>
<tr>
<td>{{ 'budget'|_ }}</td>
<td>
{{ transactionBudgets(t)|raw }}
</td>
</tr>
</table>
</div>
{% endfor %}
@@ -249,7 +245,7 @@
</div>
</div>
<!-- more than two start-->
<!-- more than two transactions-->
{% if transactions.count > 2 %}
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
@@ -270,20 +266,24 @@
</tr>
</thead>
<tbody>
{% for t in transactions %}
{% for index, t in transactions %}
<tr>
<td>{{ t.description }}</td>
<td>
{% if (index+1) != transactions|length %}
{{ t.description }}
{% endif %}
</td>
<td><a href="{{ route('accounts.show',t.account.id) }}">{{ t.account.name }}</a> ({{ t.account.accounttype.type|_ }})</td>
<td>{{ t.sum|formatAmount }}</td>
<td>{{ t.before|formatAmount }} &rarr; {{ (t.sum+t.before)|formatAmount }}</td>
<td>
{% if t.budgets[0] %}
<a href="{{ route('budgets.show',t.budgets[0].id) }}">{{ t.budgets[0].name }}</a>
{% if (index+1) != transactions|length %}
{{ transactionBudgets(t)|raw }}
{% endif %}
</td>
<td>
{% if t.categories[0] %}
<a href="{{ route('categories.show',t.categories[0].id) }}">{{ t.categories[0].name }}</a>
{% if (index+1) != transactions|length %}
{{ transactionCategories(t)|raw }}
{% endif %}
</td>