firefly-iii/resources/views/piggy-banks/show.twig
2016-04-10 17:51:51 +02:00

99 lines
4.4 KiB
Twig

{% extends "./layout/default.twig" %}
{% block breadcrumbs %}
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, piggyBank) }}
{% endblock %}
{% block content %}
<div class="row">
<div class="col-lg-8 col-md-8 col-sm-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'events'|_ }}</h3>
</div>
<div class="box-body">
<canvas id="piggy-bank-history" style="width:100%;height:400px;" height="400"></canvas>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'details'|_ }}</h3>
<!-- ACTIONS MENU -->
<div class="box-tools pull-right">
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
<div class="btn-group">
<button class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><i class="fa fa-ellipsis-v"></i></button>
<ul class="dropdown-menu" role="menu">
<li><a href="{{ route('piggy-banks.edit', piggyBank.id) }}"><i class="fa fa-pencil fa-fw"></i> {{ 'edit'|_ }}</a></li>
<li><a href="{{ route('piggy-banks.delete', piggyBank.id) }}"><i class="fa fa-trash fa-fw"></i> {{ 'delete'|_ }}</a></li>
</ul>
</div>
</div>
</div>
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<tr>
<td>{{ 'account'|_ }}</td>
<td><a href="{{ route('accounts.show', piggyBank.account_id) }}">{{ piggyBank.account.name }}</a></td>
</tr>
<tr>
<td>{{ 'target_amount'|_ }}</td>
<td>{{ piggyBank.targetamount|formatAmount }}</td>
</tr>
<tr>
<td>{{ 'saved_so_far'|_ }}</td>
<td>{{ currentRelevantRepAmount(piggyBank)|formatAmount }}</td>
</tr>
<tr>
<td>{{ 'left_to_save'|_ }}</td>
<td>{{ piggyBank.targetamount - currentRelevantRepAmount(piggyBank)|formatAmount }}</td>
</tr>
<tr>
<td>{{ 'start_date'|_ }}</td>
<td>
{% if piggyBank.startdate %}
{{ piggyBank.startdate.format('jS F Y') }}
{% else %}
<em>{{ 'no_start_date'|_ }}</em>
{% endif %}
</td>
</tr>
<tr>
<td>{{ 'target_date'|_ }}</td>
<td>
{% if piggyBank.targetdate %}
{{ piggyBank.targetdate.format('jS F Y') }}
{% else %}
<em>{{ 'no_target_date'|_ }}</em>
{% endif %}
</td>
</tr>
</table>
</div>
</div>
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'table'|_ }}</h3>
</div>
<div class="box-body table-responsive no-padding">
{% include 'list/piggy-bank-events' %}
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
<script type="text/javascript">
var piggyBankID = {{ piggyBank.id }};
</script>
<script type="text/javascript" src="js/lib/Chart.bundle.min.js"></script>
<script type="text/javascript" src="js/ff/charts.js"></script>
<script type="text/javascript" src="js/ff/piggy-banks/show.js"></script>
{% endblock %}