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

141 lines
6.4 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 %}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, objectType, 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|length > 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">
2019-08-09 20:33:57 +02:00
<p class="small text-center"><a href="{{ route('transactions.index.all',[objectType]) }}">{{ 'showEverything'|_ }}</a></p>
2017-03-11 07:41:26 +01:00
</div>
</div>
{% endif %}
2020-03-14 19:12:32 +01:00
{% if periods|length > 0 %}
2020-03-14 20:30:31 +01:00
{% set boxSize = 'col-lg-4 col-md-6 col-sm-12 col-xs-12' %}
2020-03-14 19:12:32 +01:00
<div class="row">
{# for withdrawals, deposits and transfers #}
<div class="{{ boxSize }}">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'categories'|_ }}</h3>
</div>
<div class="box-body">
<canvas id="category_chart" style="width:100%;height:250px;" height="250"></canvas>
</div>
</div>
</div>
{# only for withdrawals #}
{% if objectType == 'withdrawal' %}
<div class="{{ boxSize }}">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'budgets'|_ }}</h3>
</div>
<div class="box-body">
<canvas id="budget_chart" style="width:100%;height:250px;" height="250"></canvas>
</div>
</div>
</div>
{% endif %}
2020-03-14 20:30:31 +01:00
{% if objectType != 'withdrawal' %}
<div class="{{ boxSize }}">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'all_source_accounts'|_ }}</h3>
</div>
<div class="box-body">
<canvas id="source_chart" style="width:100%;height:250px;" height="250"></canvas>
</div>
</div>
</div>
{% endif %}
2020-03-14 19:12:32 +01:00
{# for all #}
<div class="{{ boxSize }}">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'all_destination_accounts'|_ }}</h3>
</div>
<div class="box-body">
<canvas id="destination_chart" style="width:100%;height:250px;" height="250"></canvas>
</div>
</div>
</div>
</div>
{% endif %}
2017-08-30 07:40:39 +02:00
{# list with journals #}
2017-03-11 07:41:26 +01:00
<div class="row">
<div class="{% if periods|length > 0 %}col-lg-10 col-md-10 col-sm-12{% else %}col-lg-12 col-md-12 col-sm-12{% endif %}">
2017-03-11 07:41:26 +01:00
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ subTitle }}</h3>
</div>
2018-01-13 18:01:53 +01:00
<div class="box-body no-padding">
<div style="padding:8px;">
2019-08-13 16:02:28 +02:00
<a href="{{ route('transactions.create', [objectType]) }}" class="btn btn-success"><i class="fa fa-plus fa-fw"></i> {{ 'create_new_transaction'|_ }}</a>
2018-01-13 18:01:53 +01:00
</div>
2017-08-30 07:40:39 +02:00
{# actual list #}
{% include 'list.groups' %}
2018-01-13 18:01:53 +01:00
</div>
<div class="box-footer">
2017-08-30 07:40:39 +02:00
{# links for other views #}
{% if periods|length > 0 %}
<p>
2017-08-20 12:43:31 +02:00
<i class="fa fa-calendar"></i>
2019-08-09 20:33:57 +02:00
<a href="{{ route('transactions.index.all', [objectType]) }}">{{ '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>
2019-08-09 20:33:57 +02:00
<a href="{{ route('transactions.index', [objectType]) }}">{{ 'show_the_current_period_and_overview'|_ }}</a>
2017-03-11 07:41:26 +01:00
</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-08-30 07:40:39 +02:00
{# boxes with info #}
{% if periods|length > 0 %}
<div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
2018-10-07 09:45:50 +02:00
{% include 'list.periods' %}
</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|length > 0 %}
2017-03-11 07:41:26 +01:00
<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">
2019-08-09 20:33:57 +02:00
<p class="small text-center"><a href="{{ route('transactions.index.all', [objectType]) }}">{{ 'showEverything'|_ }}</a></p>
2017-03-11 07:41:26 +01:00
</div>
</div>
2017-03-11 07:41:26 +01:00
{% endif %}
2016-01-30 08:42:04 +01:00
{% endblock %}
{% block scripts %}
2019-08-04 19:54:31 +02:00
{# required for groups.twig #}
2020-01-04 11:16:14 +01:00
<script type="text/javascript" src="v1/js/ff/list/groups.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
2020-03-14 19:12:32 +01:00
<script type="text/javascript" nonce="{{ JS_NONCE }}">
var showAll = {% if periods|length > 0 %}false{% else %}true{% endif %};
var categoryChartUri = '{{ route('chart.transactions.categories', [objectType, start.format('Y-m-d'), end.format('Y-m-d')]) }}';
var budgetChartUri = '{{ route('chart.transactions.budgets', [start.format('Y-m-d'), end.format('Y-m-d')]) }}';
var destinationChartUri = '{{ route('chart.transactions.destinationAccounts', [objectType, start.format('Y-m-d'), end.format('Y-m-d')]) }}';
2020-03-14 20:30:31 +01:00
var sourceChartUri = '{{ route('chart.transactions.sourceAccounts', [objectType, start.format('Y-m-d'), end.format('Y-m-d')]) }}';
2020-03-14 19:12:32 +01:00
</script>
<script type="text/javascript" src="v1/js/lib/Chart.bundle.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/lib/chartjs-plugin-annotation.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/charts.defaults.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/charts.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/transactions/index.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
2016-04-24 09:02:21 +02:00
{% endblock %}