firefly-iii/resources/twig/reports/year.twig
2015-07-10 05:39:35 +02:00

121 lines
4.8 KiB
Twig

{% extends "./layout/default.twig" %}
{% block breadcrumbs %}
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, start, shared) }}
{% 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">
{% if Config.get('firefly.chart') == 'google' %}
<div id="income-expenses-chart"></div>
{% endif %}
{% if Config.get('firefly.chart') == 'chartjs' %}
<canvas id="income-expenses-chart" style="width:100%;height:400px;"></canvas>
{% endif %}
</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">
{% if Config.get('firefly.chart') == 'google' %}
<div id="income-expenses-sum-chart"></div>
{% endif %}
{% if Config.get('firefly.chart') == 'chartjs' %}
<canvas id="income-expenses-sum-chart" style="width:100%;height:400px;"></canvas>
{% endif %}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6">
{% include 'partials/reports/accounts.twig' %}
{% include 'partials/reports/income-vs-expenses.twig' %}
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
{% include 'partials/reports/income.twig' %}
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
{% include 'partials/reports/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'|_ }}</h3>
</div>
<div class="box-body">
{% if Config.get('firefly.chart') == 'google' %}
<div id="categories"></div>
{% endif %}
{% if Config.get('firefly.chart') == 'chartjs' %}
<canvas id="categories" style="width:100%;height:400px;"></canvas>
{% endif %}
</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">
{% if Config.get('firefly.chart') == 'google' %}
<div id="budgets"></div>
{% endif %}
{% if Config.get('firefly.chart') == 'chartjs' %}
<canvas id="budgets" style="width:100%;height:400px;"></canvas>
{% endif %}
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
<!-- load the libraries and scripts necessary for Google Charts: -->
{% if Config.get('firefly.chart') == 'google' %}
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript" src="js/gcharts.js"></script>
{% endif %}
{% if Config.get('firefly.chart') == 'chartjs' %}
<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>
{% endif %}
<script type="text/javascript">
var year = '{{start.year}}';
var shared = {% if shared %}'/shared'
{% else %}''{% endif %};
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.js"></script>
{% endblock %}