firefly-iii/resources/views/reports/default/year.twig
2016-01-08 13:35:27 +01:00

112 lines
4.1 KiB
Twig

{% extends "./layout/default.twig" %}
{% block breadcrumbs %}
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, start, end, reportType, accountIds) }}
{% endblock %}
{% block content %}
<div class="row">
<div class="col-lg-8 col-md-8 col-sm-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'incomeVsExpenses'|_ }}</h3>
</div>
<div class="box-body">
<canvas id="income-expenses-chart" style="width:100%;height:400px;"></canvas>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'incomeVsExpenses'|_ }}</h3>
</div>
<div class="box-body">
<canvas id="income-expenses-sum-chart" style="width:100%;height:400px;"></canvas>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6">
{% include 'reports/partials/accounts.twig' %}
{% include 'reports/partials/income-vs-expenses.twig' %}
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
{% include 'reports/partials/income.twig' %}
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
{% include 'reports/partials/expenses.twig' %}
</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">{{ 'categories_spent_in_year'|_ }}</h3>
</div>
<div class="box-body">
<canvas id="categories-spent-in-period" style="width:100%;height:400px;"></canvas>
</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">{{ 'categories_earned_in_year'|_ }}</h3>
</div>
<div class="box-body">
<canvas id="categories-earned-in-period" style="width:100%;height:400px;"></canvas>
</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">{{ 'budgets'|_ }}</h3>
</div>
<div class="box-body">
<canvas id="budgets" style="width:100%;height:400px;"></canvas>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="js/Chart.min.js"></script>
<script type="text/javascript" src="js/Chart.StackedBar.js"></script>
<script type="text/javascript" src="js/charts.js"></script>
<script type="text/javascript">
var year = '{{ start.year }}';
// to report another URL:
var startDate = '{{ start.format('Ymd') }}';
var endDate = '{{ end.format('Ymd') }}';
var reportType = '{{ reportType }}';
var accountIds = '{{ accountIds }}';
var incomeTopLength = {{ incomeTopLength }};
var expenseTopLength = {{ expenseTopLength }};
var incomeRestShow = false; // starts hidden.
var expenseRestShow = false; // starts hidden.
var showTheRest = '{{ trans('firefly.showTheRest',{number:incomeTopLength}) }}';
var hideTheRest = '{{ trans('firefly.hideTheRest',{number:incomeTopLength}) }}';
var showTheRestExpense = '{{ trans('firefly.showTheRest',{number:expenseTopLength}) }}';
var hideTheRestExpense = '{{ trans('firefly.hideTheRest',{number:expenseTopLength}) }}';
</script>
<script type="text/javascript" src="js/reports/default/year.js"></script>
{% endblock %}