firefly-iii/resources/twig/piggy-banks/show.twig

125 lines
5.5 KiB
Twig
Raw Normal View History

2015-05-02 04:32:45 -05:00
{% extends "./layout/default.twig" %}
2015-06-19 13:59:14 -05:00
{% block breadcrumbs %}
2015-05-02 04:32:45 -05:00
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, piggyBank) }}
2015-06-19 13:59:14 -05:00
{% endblock %}
{% block content %}
2015-05-02 04:32:45 -05:00
<div class="row">
<div class="col-lg-8 col-md-8 col-sm-6">
2015-06-20 00:29:25 -05:00
<div class="box">
<div class="box-header with-border">
2015-05-25 12:18:16 -05:00
<i class="fa fa-fw fa-clock-o"></i> {{ 'events'|_ }}
2015-05-02 04:32:45 -05:00
</div>
2015-06-20 00:29:25 -05:00
<div class="box-body">
2015-05-02 04:32:45 -05:00
<div id="piggy-bank-history"></div>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6">
2015-06-20 00:29:25 -05:00
<div class="box">
<div class="box-header with-border">
2015-05-25 12:18:16 -05:00
<i class="fa fa-fw fa-info-circle"></i> {{ 'details'|_ }}
2015-05-02 04:32:45 -05:00
<!-- ACTIONS MENU -->
<div class="pull-right">
<div class="btn-group">
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
{{ 'actions'|_ }}
2015-05-02 04:32:45 -05:00
<span class="caret"></span>
</button>
<ul class="dropdown-menu pull-right" 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>
2015-05-02 04:32:45 -05:00
</ul>
</div>
</div>
</div>
<table class="table table-bordered table-striped">
<tr>
2015-05-25 12:18:16 -05:00
<td>{{ 'account'|_ }}</td>
2015-05-02 04:32:45 -05:00
<td><a href="{{ route('accounts.show', piggyBank.account_id) }}">{{ piggyBank.account.name }}</a></td>
</tr>
<tr>
2015-05-25 12:18:16 -05:00
<td>{{ 'target_amount'|_ }}</td>
2015-05-02 04:32:45 -05:00
<td>{{ piggyBank.targetAmount|formatAmount }}</td>
</tr>
<tr>
2015-05-25 12:18:16 -05:00
<td>{{ 'saved_so_far'|_ }}</td>
2015-05-02 04:32:45 -05:00
<td>{{ currentRelevantRepAmount(piggyBank)|formatAmount }}</td>
</tr>
<tr>
2015-05-25 12:18:16 -05:00
<td>{{ 'left_to_save'|_ }}</td>
2015-05-02 04:32:45 -05:00
<td>{{ piggyBank.targetamount - currentRelevantRepAmount(piggyBank)|formatAmount }}</td>
</tr>
<tr>
2015-05-25 12:18:16 -05:00
<td>{{ 'start_date'|_ }}</td>
2015-05-02 04:32:45 -05:00
<td>
{% if piggyBank.startdate %}
{{ piggyBank.startdate.format('jS F Y')}}
{% else %}
2015-05-25 12:18:16 -05:00
<em>{{ 'no_start_date'|_ }}</em>
2015-05-02 04:32:45 -05:00
{% endif %}
</td>
</tr>
<tr>
2015-05-25 12:18:16 -05:00
<td>{{ 'target_date'|_ }}</td>
2015-05-02 04:32:45 -05:00
<td>
{% if piggyBank.targetdate %}
{{ piggyBank.targetdate.format('jS F Y') }}
{% else %}
2015-05-25 12:18:16 -05:00
<em>{{ 'no_target_date'|_ }}</em>
2015-05-02 04:32:45 -05:00
{% endif %}
</td>
</tr>
{% if piggyBank.reminder %}
<tr>
2015-05-25 12:18:16 -05:00
<td>{{ 'reminder'|_ }}</td>
2015-05-02 04:32:45 -05:00
<td>
{% if piggyBank.remind_me == 0 %}
2015-05-25 12:18:16 -05:00
<em>{{ 'no_reminder'|_ }}</em>
2015-05-02 04:32:45 -05:00
{% else %}
2015-05-25 12:18:16 -05:00
{{ 'every'|_ }}
2015-05-02 04:32:45 -05:00
{% if piggyBank.reminder_skip != 0 %}
{{ piggyBank.reminder_skip }}
{% else %}
{{ piggyBank.reminder }}(s)
{% endif %}
{% endif %}
</td>
</tr>
{% endif %}
<tr>
2015-05-25 12:18:16 -05:00
<td>{{ 'reminders_left'|_ }}</td>
<td>{{ 'todo'|_ }}</td>
2015-05-02 04:32:45 -05:00
</tr>
<tr>
2015-05-25 12:18:16 -05:00
<td>{{ 'expected_amount_per_reminder'|_ }}</td>
<td>{{ 'todo'|_ }}</td>
2015-05-02 04:32:45 -05:00
</tr>
</table>
</div>
2015-06-20 00:29:25 -05:00
<div class="box">
<div class="box-header with-border">
2015-05-25 12:18:16 -05:00
<i class="fa fa-fw fa-clock-o"></i> {{ 'table'|_ }}
2015-05-02 04:32:45 -05:00
</div>
{% include 'list/piggy-bank-events' %}
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
<script type="text/javascript">
var piggyBankID = {{ piggyBank.id }};
</script>
<!-- load the libraries and scripts necessary for Google Charts: -->
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript" src="js/gcharts.options.js"></script>
<script type="text/javascript" src="js/gcharts.js"></script>
<script type="text/javascript" src="js/piggy-banks.js"></script>
{% endblock %}