Files
firefly-iii/resources/views/v1/categories/show.twig

109 lines
4.9 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, category, start, end) }}
2015-06-19 20:59:14 +02:00
{% endblock %}
{% block content %}
2015-06-27 08:06:24 +02:00
<div class="row">
{% if Route.getCurrentRoute.getName == 'categories.show' %}
2016-12-27 10:46:11 +01:00
{# both charts #}
2017-07-02 09:24:46 +02:00
<div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
2016-12-27 10:46:11 +01:00
<div class="box">
<div class="box-header with-border">
2017-04-23 09:33:33 +02:00
<h3 class="box-title">
{{ trans('firefly.chart_category_in_period', {name: category.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat) }) }}
</h3>
2016-12-27 10:46:11 +01:00
</div>
<div class="box-body">
2017-04-29 08:56:08 +02:00
<canvas id="specific-period" style="width:100%;height:400px;" height="400" width="100%"></canvas>
2016-12-27 10:46:11 +01:00
</div>
2015-06-27 08:06:24 +02:00
</div>
2015-05-02 09:29:34 +02:00
</div>
2017-07-02 09:24:46 +02:00
<div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
2016-12-27 10:46:11 +01:00
<div class="box">
<div class="box-header with-border">
2017-04-23 09:33:33 +02:00
<h3 class="box-title">
{{ trans('firefly.chart_category_all', {name: category.name }) }}
</h3>
2016-12-27 10:46:11 +01:00
</div>
<div class="box-body">
2017-04-29 08:56:08 +02:00
<canvas id="category-everything" style="width:100%;height:400px;" height="400" width="100%"></canvas>
2016-12-27 10:46:11 +01:00
</div>
2015-06-27 08:06:24 +02:00
</div>
2015-05-02 09:29:34 +02:00
</div>
2016-12-27 10:46:11 +01:00
{% endif %}
{% if Route.getCurrentRoute.getName == 'categories.show.all' %}
2016-12-27 11:02:14 +01:00
{# all chart #}
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="box">
<div class="box-header with-border">
2017-04-23 09:33:33 +02:00
<h3 class="box-title">
{{ trans('firefly.chart_category_all', {name: category.name }) }}
</h3>
2016-12-27 11:02:14 +01:00
</div>
<div class="box-body">
2017-04-29 08:56:08 +02:00
<canvas id="category-everything" style="width:100%;height:400px;" height="400" width="100%"></canvas>
2016-12-27 11:02:14 +01:00
</div>
</div>
</div>
{% endif %}
2015-05-02 09:29:34 +02:00
</div>
{% if periods|length > 0 %}
2017-01-08 10:20:59 +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">
<p class="small text-center"><a href="{{ route('categories.show.all',[category.id]) }}">{{ 'showEverything'|_ }}</a></p>
2017-01-08 10:20:59 +01:00
</div>
</div>
{% endif %}
2015-06-27 08:06:24 +02:00
<div class="row">
<div class="{% if periods|length > 0 %}col-lg-10 col-md-8 col-sm-12 col-xs-12{% else %}col-lg-12 col-md-12 col-sm-12 col-xs-12{% endif %}">
2015-05-02 09:29:34 +02:00
2015-06-27 08:06:24 +02:00
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'transactions'|_ }}</h3>
</div>
2016-04-23 18:53:16 +02:00
<div class="box-body">
{% if periods|length > 0 %}
{% include 'list.groups' %}
2016-12-27 10:46:11 +01:00
<p>
2017-08-20 12:43:31 +02:00
<i class="fa fa-calendar"></i>
<a href="{{ route('categories.show.all', [category.id]) }}">
2016-12-27 10:46:11 +01:00
{{ 'show_all_no_filter'|_ }}
</a>
</p>
{% else %}
{% include 'list.groups' %}
2016-12-27 10:46:11 +01:00
<p>
2017-08-20 12:43:31 +02:00
<i class="fa fa-calendar"></i>
2016-12-27 10:46:11 +01:00
<a href="{{ route('categories.show', [category.id]) }}">
{{ 'show_the_current_period_and_overview'|_ }}
</a>
</p>
{% endif %}
2015-06-27 08:06:24 +02:00
</div>
2015-05-02 09:29:34 +02:00
</div>
</div>
{% if periods|length > 0 %}
2016-12-27 10:46:11 +01:00
<div class="col-lg-2 col-md-4 col-sm-12 col-xs-12">
2018-09-10 20:24:19 +02:00
{% include 'list.periods' %}
2016-12-27 10:46:11 +01:00
</div>
{% endif %}
2015-05-02 09:29:34 +02:00
</div>
{% endblock %}
{% block scripts %}
2015-06-27 08:06:24 +02:00
<script type="text/javascript">
2016-12-06 07:48:41 +01:00
var current = '{{ route('chart.category.current', [category.id]) }}';
2017-04-23 09:33:33 +02:00
var everything = '{{ route('chart.category.all', [category.id]) }}';
2016-12-27 10:46:11 +01:00
var specific = '{{ route('chart.category.specific', [category.id, start.format('Ymd')]) }}';
2015-06-27 08:06:24 +02:00
</script>
<script type="text/javascript" src="v1/js/lib/Chart.bundle.min.js?v={{ FF_VERSION }}"></script>
<script type="text/javascript" src="v1/js/ff/charts.defaults.js?v={{ FF_VERSION }}"></script>
<script type="text/javascript" src="v1/js/ff/charts.js?v={{ FF_VERSION }}"></script>
<script type="text/javascript" src="v1/js/ff/categories/show.js?v={{ FF_VERSION }}"></script>
2019-08-04 19:54:31 +02:00
{# required for groups.twig #}
<script type="text/javascript" src="v1/js/ff/list/groups.js?v={{ FF_VERSION }}"></script>
{% endblock %}