mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-05 13:44:58 -06:00
Some generic templates and the first piggy bank ones [skip ci]
This commit is contained in:
parent
466c2a68c2
commit
5cd2ef4a5e
@ -31,6 +31,11 @@ class General extends Twig_Extension
|
||||
return App::make('amount')->format($string);
|
||||
}, ['is_safe' => ['html']]
|
||||
);
|
||||
$filters[] = new Twig_SimpleFilter(
|
||||
'formatAmountPlain', function ($string) {
|
||||
return App::make('amount')->format($string, false);
|
||||
}
|
||||
);
|
||||
|
||||
$filters[] = new Twig_SimpleFilter(
|
||||
'formatJournal', function ($journal) {
|
||||
|
1
resources/twig/emails/password.twig
Normal file
1
resources/twig/emails/password.twig
Normal file
@ -0,0 +1 @@
|
||||
Click here to reset your password: {{ url('password/reset/' . token) }}
|
5
resources/twig/emails/registered.twig
Normal file
5
resources/twig/emails/registered.twig
Normal file
@ -0,0 +1,5 @@
|
||||
Hey there!
|
||||
|
||||
Welkome to Firefly III. Your registration has made it, and this email is here to confirm it.
|
||||
|
||||
Thanks for using Firefly!
|
41
resources/twig/errors/503.twig
Normal file
41
resources/twig/errors/503.twig
Normal file
@ -0,0 +1,41 @@
|
||||
<html>
|
||||
<head>
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:100' rel='stylesheet' type='text/css'>
|
||||
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: #B0BEC5;
|
||||
display: table;
|
||||
font-weight: 100;
|
||||
font-family: 'Lato';
|
||||
}
|
||||
|
||||
.container {
|
||||
text-align: center;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.content {
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 72px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="content">
|
||||
<div class="title">Be right back.</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
56
resources/twig/list/piggy-banks.twig
Normal file
56
resources/twig/list/piggy-banks.twig
Normal file
@ -0,0 +1,56 @@
|
||||
<table class="table table-striped" id="sortable">
|
||||
<tbody>
|
||||
{% for piggyBank in piggyBanks %}
|
||||
<tr data-id="{{ piggyBank.id }}">
|
||||
<td style="width:60px;">
|
||||
<i class="fa fa-fw fa-bars handle"></i>
|
||||
<i class="loadSpin"></i>
|
||||
</td>
|
||||
<td style="width:100px;">
|
||||
<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-default 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>
|
||||
<td style="text-align:right;width:40px;">
|
||||
{% if piggyBank.savedSoFar > 0 %}
|
||||
<a href="{{route('piggy-banks.removeMoney', piggyBank.id)}}" class="btn btn-default btn-xs removeMoney" data-id="{{ piggyBank.id }}"><span data-id="{{ piggyBank.id }}" class="glyphicon glyphicon-minus"></span></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="progress progress-striped" style="margin-bottom:0;">
|
||||
<div
|
||||
{% if piggyBank.percentage == 100 %}
|
||||
class="progress-bar progress-bar-success"
|
||||
{% else %}
|
||||
class="progress-bar progress-bar-info"
|
||||
{% endif %}
|
||||
role="progressbar" aria-valuenow="{{ piggyBank.percentage }}" aria-valuemin="0" aria-valuemax="100" style="min-width: 40px;width: {{ piggyBank.percentage }}%;">
|
||||
{{ piggyBank.percentage }}%
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
|
||||
<td style="width:40px;">
|
||||
{% if piggyBank.leftToSave > 0 %}
|
||||
<a href="{{ route('piggy-banks.addMoney', piggyBank.id) }}" class="btn btn-default btn-xs addMoney" data-id="{{ piggyBank.id }}"><span data-id="{{ piggyBank.id }}" class="glyphicon glyphicon-plus"></span></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td style="width:200px;">
|
||||
<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>
|
62
resources/twig/piggy-banks/index.twig
Normal file
62
resources/twig/piggy-banks/index.twig
Normal file
@ -0,0 +1,62 @@
|
||||
{% extends "./layout/default.twig" %}
|
||||
{% block content %}
|
||||
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }}
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<p>
|
||||
<i class="fa fa-sort-amount-asc fa-fw"></i> <a href="{{ route('piggy-banks.create') }}" class="btn btn-success">Create new piggy bank</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Piggy banks</div>
|
||||
{% include 'list/piggy-banks.twig' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-fw fa-money"></i> Account status
|
||||
</div>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Account</th>
|
||||
<th>Balance</th>
|
||||
<th>Left for piggy banks</th>
|
||||
<th>Sum of piggy banks</th>
|
||||
<th>Saved so far</th>
|
||||
<th>Left to save</th>
|
||||
</tr>
|
||||
{% for id,info in accounts %}
|
||||
<tr>
|
||||
<td><a href="{{ route('accounts.show',id) }}">{{ info.name }}</a></td>
|
||||
<td>{{ info.balance|formatAmount }}</td>
|
||||
<td>{{ info.leftForPiggyBanks|formatAmount }}</td>
|
||||
<td>{{ info.sumOfTargets|formatAmount }}</td>
|
||||
<td>{{ info.sumOfSaved|formatAmount }}</td>
|
||||
<td>{{ info.leftToSave|formatAmount }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- this is the modal for the add/remove money routine: -->
|
||||
<div class="modal fade" id="moneyManagementModal">
|
||||
|
||||
|
||||
|
||||
</div><!-- /.modal -->
|
||||
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="js/jquery-ui.min.js" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="js/piggy-banks.js"></script>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user