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.
51 lines
2.2 KiB
51 lines
2.2 KiB
{% extends "cash/base.html" %} |
|
{% load url from future %} |
|
{% load i18n %} |
|
|
|
|
|
{% block content %} |
|
<h1>{% trans "Transaction list" context "monthly statement" %}</h1> |
|
|
|
{% if transaction_list %} |
|
|
|
<div class="visible-xs"> |
|
{% 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/> |
|
</div> |
|
|
|
<table class="table table-striped"> |
|
<thead> |
|
<tr> |
|
<th>{% trans "Date" %}</th> |
|
<th>{% trans "Subject" %}</th> |
|
<th class="hidden-xs">{% trans "Description" %}</th> |
|
<th style="text-align: right;">{% trans "amount" context "money" %}</th> |
|
</tr> |
|
</thead> |
|
{% for t in transaction_list %} |
|
<tr> |
|
<td class="visible-xs">{{ t.timestamp|date:'d.m.y' }}</td> |
|
<td class="hidden-xs">{{ t.timestamp|date:'DATE_FORMAT' }}, {{ t.timestamp|date:'H:i' }}</td> |
|
<td>{% trans t.subject %}<span class="visible-xs">{% if detailed %}<br/>{% trans t.description %}{% endif %}</span></td> |
|
<td class="hidden-xs">{% trans t.description %}</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 %}
|
|
|