Files
firefly-iii/resources/views/transactions/index.twig

97 lines
4.5 KiB
Twig
Raw Normal View History

2016-11-06 08:11:43 +01:00
{% extends "./layout/default" %}
2015-06-19 20:59:14 +02:00
{% block breadcrumbs %}
2017-03-11 07:41:26 +01:00
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, what, moment, start, end) }}
2015-06-19 20:59:14 +02:00
{% endblock %}
{% block content %}
2016-11-20 12:51:33 +01:00
2017-03-11 07:41:26 +01:00
{# upper show-all instruction #}
{% if periods.count > 0 %}
<div class="row">
2017-03-11 07:41:26 +01:00
<div class="col-lg-offset-10 col-lg-2 col-md-offset-10 col-md-2 col-sm-12 col-xs-12">
<p class="small text-center"><a href="{{ route('transactions.index',[what, 'all']) }}">{{ 'showEverything'|_ }}</a></p>
</div>
</div>
{% endif %}
<div class="row">
<div class="{% if periods.count > 0 %}col-lg-10 col-md-10 col-sm-12{% else %}col-lg-12 col-md-12 col-sm-12{% endif %}">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ subTitle }}</h3>
</div>
<div class="box-body ">
2017-06-02 12:59:14 +02:00
{% include 'list.journals' with {'journals': journals} %}
2017-03-11 07:41:26 +01:00
{% if periods.count > 0 %}
<p>
2017-08-20 12:43:31 +02:00
<i class="fa fa-calendar"></i>
2017-03-11 07:41:26 +01:00
<a href="{{ route('transactions.index', [what, 'all']) }}">{{ 'show_all_no_filter'|_ }}</a>
</p>
2017-03-11 07:41:26 +01:00
{% else %}
<p>
2017-08-20 12:43:31 +02:00
<i class="fa fa-calendar"></i>
2017-03-11 07:41:26 +01:00
<a href="{{ route('transactions.index', [what]) }}">{{ 'show_the_current_period_and_overview'|_ }}</a>
</p>
{% endif %}
2016-11-20 12:51:33 +01:00
</div>
</div>
2017-03-11 07:41:26 +01:00
</div>
2016-11-20 12:51:33 +01:00
2017-03-11 07:41:26 +01:00
{% if periods.count > 0 %}
<div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
{% for period in periods %}
{% if period.count > 0 %}
<div class="box {% if period.date == start %}box-solid box-primary{% endif %}">
<div class="box-header with-border">
<h3 class="box-title"><a href="{{ route('transactions.index',[what, period.string]) }}">{{ period.name }}</a>
</h3>
</div>
<div class="box-body no-padding">
<table class="table table-hover">
2017-03-11 07:41:26 +01:00
<tr>
<td style="width:33%;">{{ 'transactions'|_ }}</td>
<td style="text-align: right;">{{ period.count }}</td>
2017-03-11 07:41:26 +01:00
</tr>
{% if what == 'withdrawal' %}
<tr>
<td style="width:33%;">{{ 'spent'|_ }}</td>
<td style="text-align: right;">{{ period.spent|formatAmount }}</td>
</tr>
{% endif %}
{% if what == 'deposit' %}
<tr>
<td style="width:33%;">{{ 'earned'|_ }}</td>
<td style="text-align: right;">{{ period.earned|formatAmount }}</td>
</tr>
{% endif %}
{% if what == 'transfers' or what == 'transfer' %}
<tr>
<td style="width:33%;">{{ 'transferred'|_ }}</td>
<td style="text-align: right;" class="text-info">{{ period.transferred|formatAmountPlain }}</td>
</tr>
{% endif %}
</table>
</div>
</div>
{% endif %}
{% endfor %}
</div>
2017-03-11 07:41:26 +01:00
{% endif %}
</div>
2017-03-11 07:41:26 +01:00
{# lower show-all instruction #}
{% if periods.count > 0 %}
<div class="row">
<div class="col-lg-offset-10 col-lg-2 col-md-offset-10 col-md-2 col-sm-12 col-xs-12">
<p class="small text-center"><a href="{{ route('transactions.index',[what, 'all']) }}">{{ 'showEverything'|_ }}</a></p>
</div>
</div>
2017-03-11 07:41:26 +01:00
{% endif %}
2016-01-30 08:42:04 +01:00
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="js/ff/transactions/list.js"></script>
2016-04-24 09:02:21 +02:00
{% endblock %}