39 lines
1.3 KiB
HTML
39 lines
1.3 KiB
HTML
{% extends 'layout.html' %}
|
|
{% block main_content %}
|
|
<h1>{{ account.name }}</h1>
|
|
{% include 'update_button.html' %}
|
|
<table class="table">
|
|
<tr><td>Current balance</td><td>{{ account.balance }}</td></tr>
|
|
<tr><td>Last updated</td><td>{{ account.last_updated }}</td></tr>
|
|
<tr><td>Transactions</td><td></td></tr>
|
|
</table>
|
|
{% if records %}
|
|
<h2>Transactions</h2>
|
|
<table class="table">
|
|
<tr><th>Name</th><th>Type</th><th>Amount</th><th>Posted</th><th></th></tr>
|
|
{% for record in records %}
|
|
<tr>
|
|
<td>{{ record.name }}</a></td>
|
|
<td>{{ record.type }}</td>
|
|
<td>{{ record.amount }}</td>
|
|
<td>{{ record.posted }}</td>
|
|
<td>
|
|
<form method="POST" action="/update/">
|
|
<input type="hidden" name="account_uuid" value="{{ account.uuid }}"></input>
|
|
<input type="submit" value="Update" class="btn btn-primary"></input>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% else %}
|
|
<p>This account does not have any transactions yet</p>
|
|
{% endif %}
|
|
<form method="POST" action="/transactions/" enctype="multipart/form-data">
|
|
<p>Want to upload your own transactions? Cool. Do it here.</p>
|
|
<input type="hidden" name="account_uuid" value="{{ account.uuid }}">
|
|
<input type="file" name="transactions" id="transactions">
|
|
<input type="submit">
|
|
</form>
|
|
{% endblock %}
|