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.
42 lines
2.0 KiB
42 lines
2.0 KiB
{% extends "cash/base.html" %} |
|
{% load url from future %} |
|
{% load i18n %} |
|
|
|
|
|
{% block content %} |
|
<h1>{% trans "Transaction list" context "monthly statement" %}</h1> |
|
|
|
{% if transaction_list %} |
|
|
|
{% if detailed %} |
|
<a href="{% url 'transactions' transaction_list.number %}" class="btn btn-default">{% trans "less detailed" %}</a> |
|
{% else %} |
|
<a href="{% url 'transactions_detailed' transaction_list.number %}" class="btn btn-default">{% trans "more detailed" %}</a> |
|
{% endif %} |
|
<br/> |
|
|
|
<table> |
|
<thead> |
|
<tr><th>{% trans "Date" %}</th><th>{% trans "Subject" %}</th><th style="text-align: right;">{% trans "amount" context "money" %}</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>{% trans t.subject %}{% if detailed %}<br/><i>{% trans t.description %}</i>{% endif %}</td> |
|
<td style="text-align: right; color: {% if t.amount < 0 %}red{% else %}green{% endif %}">{{ t.amount|floatformat:2 }} €</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 %}">«</a></li> |
|
<li><span>{% blocktrans with current=transaction_list.number num=transaction_list.paginator.num_pages %}Page {{ current }} of {{ num }}{% endblocktrans %}</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 %}">»</a></li> |
|
</ul> |
|
|
|
|
|
{% else %} |
|
{% blocktrans %}No transactions have been made, yet.{% endblocktrans %} |
|
{% endif %} |
|
|
|
{% endblock %}
|
|
|