Source

django-pim / pcbank / templates / pcbank / bank_detail.html

{% extends "pcbank/base.html" %}
{% load pcbank_extras %}

{% block body %}
<table class="table table-condensed">
<tr><td><b>Title:</b></td><td>{{object.title}}</td></tr>
<tr><td><b>Card number:</b></td><td>{{object.card}}</td></tr>
<tr><td><b>Balance:</b></td><td>${{object.balance|floatformat:2}}</td></tr>
<tr><td><b>Active:</b></td><td>{{object.active}}</td></tr>
<tr><td><b>Added on:</b></td><td>{{object.added_on}}</td></tr>
<tr><td><b>Online banking:</b></td><td><a href="{{object.url}}" class="btn btn-success">Access account</a></td></tr>
</table>
<a href="{{object.get_edit_url}}" class="btn">Edit Bank</a>
<form action="{% url bank-transfer object.pk %}" method="post">{% csrf_token %}
<b>Transfer:</b> <input type="text" name="amount"/>
<b>To Bank:</b> {% bank_list %}
<input type="submit" value="Do Transfer" class="btn btn-primary" />
</form>
{% if object.transactions.all %}
<table class="table table-striped table-condensed table-bordered">
<thead>
<tr><th>Date</th><th>To</th><th>Amount</th></tr>
</thead><tbody>
{% for transaction in object.transactions.all %}
<tr><td>{{transaction.date}}</td><td><a href="{{transaction.content_object.get_absolute_url}}">{{transaction.content_object}}</a></td><td>${{transaction.amount|floatformat:2}}</td></tr>
{% endfor %}
</tbody></table>
{% endif %}
{% if object.income.all %}
<table class="table table-striped table-condensed table-bordered">
<thead>
<tr><th>Date</th><th>From</th><th>Amount</th></tr>
</thead><tbody>
{% for transaction in object.income.all %}
<tr><td>{{transaction.date}}</td><td><a href="{{transaction.from_obj.get_absolute_url}}">{{transaction.from_obj}}</a></td><td>${{transaction.amount|floatformat:2}}</td></tr>
{% endfor %}
</tbody></table>
{% endif %}
{% endblock %}