diff options
Diffstat (limited to 'templates/transactions.htm')
| -rw-r--r-- | templates/transactions.htm | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/templates/transactions.htm b/templates/transactions.htm new file mode 100644 index 0000000..f2b93ba --- /dev/null +++ b/templates/transactions.htm @@ -0,0 +1,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 +--> |
