firefly-iii/resources/views/list/piggy-banks.twig

62 lines
3.1 KiB
Twig
Raw Normal View History

2015-07-19 15:19:26 -05:00
<table class="table table-hover table-condensed" id="sortable">
<tbody>
{% for piggyBank in piggyBanks %}
2015-06-21 03:50:45 -05:00
<tr data-id="{{ piggyBank.id }}">
2015-06-25 10:06:20 -05:00
<td style="width:60px;" class="hidden-sm hidden-xs">
2015-06-21 03:50:45 -05:00
<i class="fa fa-fw fa-bars handle"></i>
<i class="loadSpin"></i>
</td>
2015-06-25 10:06:20 -05:00
<td style="width:100px;" class="hidden-sm hidden-xs">
2015-06-21 03:50:45 -05:00
<div class="btn-group btn-group-xs">
<a href="{{ route('piggy-banks.edit', piggyBank.id) }}" class="btn btn-default btn-xs"><i class="fa fa-pencil fa-fw"></i></a>
<a href="{{ route('piggy-banks.delete', piggyBank.id) }}" class="btn btn-danger btn-xs"><i class="fa fa-trash fa-fw"></i></a>
</div>
</td>
<td>
<a href="{{ route('piggy-banks.show', piggyBank.id) }}" title="{{ piggyBank.order }}">{{ piggyBank.name }}</a>
</td>
<td>
<span title="Saved so far">{{ piggyBank.savedSoFar|formatAmountPlain }}</span>
</td>
2015-06-25 10:06:20 -05:00
<td class="hidden-sm hidden-xs" style="text-align:right;width:40px;">
2015-06-21 03:50:45 -05:00
{% if piggyBank.savedSoFar > 0 %}
2015-06-23 12:07:37 -05:00
<a href="{{ route('piggy-banks.removeMoney', piggyBank.id) }}" class="btn btn-default btn-xs removeMoney" data-id="{{ piggyBank.id }}">
<i data-id="{{ piggyBank.id }}" class="fa fa-minus"></i></a>
2015-06-21 03:50:45 -05:00
{% endif %}
</td>
2015-06-25 10:06:20 -05:00
<td class="hidden-sm hidden-xs">
2015-06-21 03:50:45 -05:00
<div class="progress progress" style="margin-bottom:0;">
<div
{% if piggyBank.percentage == 100 %}
class="progress-bar progress-bar-success"
2015-07-19 11:39:06 -05:00
{% elseif piggyBank.percentage == 0 %}
class="progress-bar progress-bar-warning"
2015-06-21 03:50:45 -05:00
{% else %}
class="progress-bar progress-bar-info"
{% endif %}
role="progressbar" aria-valuenow="{{ piggyBank.percentage }}" aria-valuemin="0" aria-valuemax="100"
2015-07-19 11:39:06 -05:00
style="min-width: 30px;width: {{ piggyBank.percentage }}%;">
2015-06-21 03:50:45 -05:00
{{ piggyBank.percentage }}%
</div>
</div>
2015-06-21 03:50:45 -05:00
</td>
2015-06-25 10:06:20 -05:00
<td class="hidden-sm hidden-xs" style="width:40px;">
2015-06-21 03:50:45 -05:00
{% if piggyBank.leftToSave > 0 %}
2015-06-23 12:07:37 -05:00
<a href="{{ route('piggy-banks.addMoney', piggyBank.id) }}" class="btn btn-default btn-xs addMoney" data-id="{{ piggyBank.id }}">
<i data-id="{{ piggyBank.id }}" class="fa fa-plus"></i></a>
2015-06-21 03:50:45 -05:00
{% endif %}
</td>
2015-06-25 10:06:20 -05:00
<td class="hidden-sm hidden-xs" style="width:200px;">
2015-06-21 03:50:45 -05:00
<span title="Target amount">{{ piggyBank.targetamount|formatAmount }}</span>
{% if piggyBank.leftToSave > 0 %}
<span title="Left to save">({{ piggyBank.leftToSave|formatAmount }})</span>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>