You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

41 lines
1.7 KiB

{% extends "cash/base.html" %}
{% load url from future %}
{% block content %}
<h1>Kontoauszug</h1>
{% if transaction_list %}
{% if detailed %}
<a href="{% url 'transactions' transaction_list.number %}" class="btn btn-default">weniger Details</a>
{% else %}
<a href="{% url 'transactions_detailed' transaction_list.number %}" class="btn btn-default">mehr Details</a>
{% endif %}
<br/>
<table>
<thead>
<tr><th>Datum</th><th>Betreff</th><th style="text-align: right;">Betrag</th></tr>
</thead>
{% for t in transaction_list %}
<tr>
<td>{% if detailed %}{{ t.timestamp|date:'d.m.Y H:i:s' }}{% else %}{{ t.timestamp|date:'d.m.Y'}}{% endif %}</td>
<td>{{ t.subject }}{% if detailed %}<br/><i>{{ t.description }}</i>{% endif %}</td>
<td style="text-align: right; color: {% if t.amount < 0 %}red{% else %}green{% endif %}">{{ t.amount|floatformat:2 }} &euro;</td>
</tr>
{% endfor %}
</table>
<ul class="pagination">
<li {% if not transaction_list.has_previous %}class="disabled"{% endif %}><a href="{% if transaction_list.has_previous %}{% if detailed %}{% url 'transactions_detailed' page=transaction_list.previous_page_number %}{% else %}{% url 'transactions' page=transaction_list.previous_page_number %}{% endif %}{% endif %}">&laquo;</a></li>
<li><span>Seite {{ transaction_list.number }} von {{ transaction_list.paginator.num_pages }}</span></li>
<li {% if not transaction_list.has_next %}class="disabled"{% endif %}><a href="{% if transaction_list.has_next %}{% if detailed %}{% url 'transactions_detailed' page=transaction_list.next_page_number %}{% else %}{% url 'transactions' page=transaction_list.next_page_number %}{% endif %}{% endif %}">&raquo;</a></li>
</ul>
{% else %}
Es wurden noch keine Transaktionen durchgeführt.
{% endif %}
{% endblock %}