blob: f2b93ba7634d396f841acdf9f66cc924ace5390f (
plain) (
blame)
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
|
{% extends "base.htm" %}
{% block title %}Transactions{% endblock %}
{% block content %}
<h1>{{ name }}'s Transactions</h1>
<h2>{{ amount|fmt_points }}</h2>
<div class="settings">
<a class="button" href="/transfer">Transfer Points</a>
<a class="button" href="/settings">Settings</a>
<a class="button" href="/logout">Logout</a>
</div>
<table>
<tr>
<td>Time</td>
<td>Amount</td>
<td>Balance</td>
<td>Other</td>
<td>Purpose</td>
</tr>
{% for transaction in transactions %}
<tr>
<td>{{ transaction.date }}</td>
{% if name == transaction.sender -%}
<td class="minus text-right">-{{ transaction.amount }}</td>
<td class="text-right">{{ transaction.sender_balance }}</td>
<td>{{ transaction.receiver }}</td>
{% else -%}
<td class="plus text-right">{{ transaction.amount }}</td>
<td class="text-right">{{ transaction.receiver_balance }}</td>
<td>{{ transaction.sender }}</td>
{% endif -%}
<td>{{ transaction.purpose }}</td>
</tr>
{% endfor %}
</table>
{% endblock %}
<!-- vim: expandtab sw=2 ts=2
-->
|