firefly-iii/resources/views/piggy-banks/index.twig
2018-01-13 18:01:53 +01:00

71 lines
3.4 KiB
Twig

{% extends "./layout/default" %}
{% block breadcrumbs %}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName) }}
{% endblock %}
{% block content %}
{% if piggyBanks.count == 0 %}
{% include 'partials.empty' with {what: 'default', type: 'piggies',route: route('piggy-banks.create')} %}
{% else %}
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'piggyBanks'|_ }}</h3>
</div>
<div class="box-body no-padding">
<div style="padding:8px;">
<a class="btn btn-success" href="{{ route('piggy-banks.create') }}"><i class="fa fa-plus fa-fw"></i> {{ 'create_new_piggy_bank'|_ }}</a>
</div>
{% include 'list/piggy-banks' %}
</div>
<div class="box-footer">
<a class="btn btn-success" href="{{ route('piggy-banks.create') }}"><i class="fa fa-plus fa-fw"></i> {{ 'create_new_piggy_bank'|_ }}</a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'account_status'|_ }}</h3>
</div>
<div class="box-body table-responsive no-padding">
<table class="table table-hover" id="accountStatus">
<thead>
<tr>
<th>{{ 'account'|_ }}</th>
<th style="text-align:right;" class="hidden-sm hidden-xs">{{ 'balance'|_ }}</th>
<th style="text-align:right;">{{ 'left_for_piggy_banks'|_ }}</th>
<th style="text-align:right;" class="hidden-sm hidden-xs">{{ 'sum_of_piggy_banks'|_ }}</th>
<th style="text-align:right;" class="hidden-sm hidden-xs">{{ 'saved_so_far'|_ }}</th>
<th style="text-align:right;" class="hidden-sm hidden-xs">{{ 'left_to_save'|_ }}</th>
</tr>
</thead>
<tbody>
{% for id,info in accounts %}
<tr>
<td><a href="{{ route('accounts.show',id) }}" title="{{ info.name }}">{{ info.name }}</a></td>
<td style="text-align:right;" class="hidden-sm hidden-xs">{{ info.balance|formatAmount }}</td>
<td style="text-align:right;">{{ info.leftForPiggyBanks|formatAmount }}</td>
<td style="text-align:right;" class="hidden-sm hidden-xs">{{ info.sumOfTargets|formatAmount }}</td>
<td style="text-align:right;" class="hidden-sm hidden-xs">{{ info.sumOfSaved|formatAmount }}</td>
<td style="text-align:right;" class="hidden-sm hidden-xs">{{ info.leftToSave|formatAmount }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
{% endif %}
{% endblock %}
{% block scripts %}
<script src="js/lib/jquery-ui.min.js?v={{ FF_VERSION }}" type="text/javascript"></script>
<script type="text/javascript" src="js/ff/piggy-banks/index.js?v={{ FF_VERSION }}"></script>
{% endblock %}