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

155 lines
7.1 KiB
Twig
Raw Normal View History

2022-01-29 14:19:01 +01:00
{% extends './layout/default' %}
2022-01-29 14:15:34 +01:00
{% block breadcrumbs %}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, piggyBank) }}
{% endblock %}
{% block content %}
<div class="row">
<div class="col-lg-8 col-md-8 col-sm-6">
<div class="box" id="piggyChart">
<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" width="100%"></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>
<div class="box-tools pull-right">
<div class="btn-group">
<button class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><span class="fa fa-ellipsis-v"></span></button>
<ul class="dropdown-menu" role="menu">
<li><a href="{{ route('piggy-banks.edit', piggy.id) }}"><span class="fa fa-pencil fa-fw"></span> {{ 'edit'|_ }}</a></li>
<li><a href="{{ route('piggy-banks.delete', piggy.id) }}"><span class="fa fa-trash fa-fw"></span> {{ 'delete'|_ }}</a></li>
</ul>
</div>
</div>
</div>
<div class="box-body no-padding">
<table class="table table-responsive table-hover" id="piggyDetails">
<tr>
2024-12-14 17:32:03 +01:00
<td style="width:40%;">{{ 'saveOnAccounts'|_ }}</td>
<td>
{% for account in piggy.accounts %}
<a href="{{ route('accounts.show', account.id) }}">{{ account.name }}</a><br>
{% endfor %}
</td>
2022-01-29 14:15:34 +01:00
</tr>
{% if piggy.object_group_title %}
2023-09-05 19:34:46 +02:00
<tr>
<td style="width:40%;">{{ 'object_group'|_ }}</td>
<td>{{ piggy.object_group_title }}</a></td>
</tr>
2022-01-29 14:15:34 +01:00
{% endif %}
2022-03-27 18:30:46 +02:00
{% if null != piggy.target_amount %}
2023-09-05 19:34:46 +02:00
<tr>
<td>{{ 'target_amount'|_ }}</td>
<td>
{{ formatAmountBySymbol(piggy.target_amount, piggy.currency_symbol, piggy.currency_decimal_places) }}
</td>
</tr>
2022-03-27 18:30:46 +02:00
{% endif %}
2022-01-29 14:15:34 +01:00
<tr>
<td>{{ 'saved_so_far'|_ }}</td>
<td>
{{ formatAmountBySymbol(piggy.current_amount, piggy.currency_symbol, piggy.currency_decimal_places) }}
</td>
</tr>
2022-03-27 18:30:46 +02:00
{% if null != piggy.left_to_save %}
2023-09-05 19:34:46 +02:00
<tr>
<td>{{ 'left_to_save'|_ }}</td>
<td>
{{ formatAmountBySymbol(piggy.left_to_save, piggy.currency_symbol, piggy.currency_decimal_places) }}
</td>
</tr>
2022-03-27 18:30:46 +02:00
{% endif %}
2022-01-29 14:15:34 +01:00
<tr>
<td>{{ 'start_date'|_ }}</td>
<td>
2025-02-04 08:37:02 +01:00
{% if piggyBank.start_date %}
{{ piggyBank.start_date.isoFormat(monthAndDayFormat) }}
2022-01-29 14:15:34 +01:00
{% else %}
<em>{{ 'no_start_date'|_ }}</em>
{% endif %}
</td>
</tr>
<tr>
<td>{{ 'target_date'|_ }}</td>
<td>
2025-02-04 08:37:02 +01:00
{% if piggyBank.target_date %}
{{ piggyBank.target_date.isoFormat(monthAndDayFormat) }}
2022-01-29 14:15:34 +01:00
{% else %}
<em>{{ 'no_target_date'|_ }}</em>
{% endif %}
</td>
</tr>
2025-02-04 08:37:02 +01:00
{% if piggyBank.target_date and piggy.save_per_month %}
2022-01-29 14:15:34 +01:00
<tr>
<td>{{ 'suggested_amount'|_ }}</td>
<td>
{{ formatAmountBySymbol(piggy.save_per_month, piggy.currency_symbol, piggy.currency_decimal_places) }}
</td>
</tr>
{% endif %}
</table>
</div>
</div>
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'event_history'|_ }}</h3>
2022-01-29 14:15:34 +01:00
</div>
<div class="box-body no-padding" id="piggyEvents">
{% include 'list/piggy-bank-events' %}
</div>
</div>
</div>
</div>
<div class="row">
{% if piggy.notes %}
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ trans('form.notes') }}</h3>
</div>
<div class="box-body markdown">{{ piggy.notes|default('')|markdown }}
</div>
</div>
</div>
{% endif %}
{% if attachments.count() > 0 %}
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">
{{ 'attachments'|_ }}
</h3>
</div>
<div class="box-body no-padding">
{% include 'list.attachments' %}
</div>
</div>
</div>
{% endif %}
</div>
{% endblock %}
{% block scripts %}
<script type="text/javascript" nonce="{{ JS_NONCE }}">
var piggyBankID = {{ piggyBank.id }};
</script>
<script type="text/javascript" src="v1/js/lib/Chart.bundle.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/charts.defaults.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/charts.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/piggy-banks/show.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
{% endblock %}