1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
{% extends "base.html" %}
{#
This file is part of GNU TALER.
Copyright (C) 2014, 2015, 2016 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU Lesser General Public License as published by the Free Software
Foundation; either version 2.1, or (at your option) any later version.
TALER is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
@author Marcello Stanisci
#}
{% block headermsg %}
<h1 class="nav">History of public accounts</h1>
{% endblock headermsg %}
{% block content %}
<a href="{{ url('index') }}">Back</a>
<section id="main">
<article>
{% if fail_message %}
<div class="notification">
<p class="informational informational-fail">
{{ hint }}
</p>
</div>
{% endif %}
{% if success_message %}
<div class="notification">
<p class="informational informational-ok">
{{ hint }}
</p>
</div>
{% endif %}
<div name="accountMenu" class="pure-menu pure-menu-horizontal">
<ul class="pure-menu-list">
{% for account in public_accounts %}
{% if account.account_no == selected_account.number %}
<li class="pure-menu-item pure-menu-selected">
{% else %}
<li class="pure-menu-item pure-menu">
{% endif %}
<a href="{{ url("public-accounts", name=account.user.username) }}" class="pure-menu-link">
{{ account.user.username }}
</a>
</li>
{% endfor %}
</ul>
</div>
<div class="results">
{% if selected_account.history %}
<table class="pure-table pure-table-striped">
<thead>
<th>Date</th>
<th>Amount</th>
<th>Counterpart</th>
<th>Subject</th>
</thead>
<tbody>
{% for entry in selected_account.history %}
<tr>
<td>{{entry.date}}</td>
<td>
{{ entry.sign }} {{ entry.amount }}
</td>
<td>{% if entry.counterpart_username %} {{ entry.counterpart_username }} {% endif %} (account #{{ entry.counterpart }})</td>
<td {% if entry.cancelled %} class="cancelled" {% endif %}>
{{ entry.subject }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="pages-list">
{% if back %}
<a
class="page-number"
href="{{ url("public-accounts", name=selected_account.name, page=back) }}">‹...</a>
{% endif %}
{% for pagej in pages %}
<a
{% if pagej == current_page%}
class="current-page-number"
{% else %}
class="page-number"
{% endif %}
href="{{ url("public-accounts", name=selected_account.name, page=pagej) }}">{{ pagej }}</a>
{% endfor %}
{% if forth %}
<a
class="page-number"
href="{{ url("public-accounts", name=selected_account.name, page=forth) }}">...›</a>
{% endif %}
</div>
{% else %}
<p>No history for account #{{ selected_account.number }} ({{ selected_account.name}}) yet</p>
{% endif %}
</div>
</article>
</section>
{% endblock content %}
|