combo/combo/apps/lingo/templates/lingo/transaction_list.html

75 lines
1.8 KiB
HTML

{% extends "lingo/manager_base.html" %}
{% load i18n %}
{% block appbar %}
<h2>{% trans 'Transactions' %}</h2>
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'lingo-manager-transactions-list' %}">{% trans 'Transactions' %}</a>
{% endblock %}
{% block content %}
{% if object_list %}
<table class="main">
<thead>
<tr>
<th>{% trans 'Transaction Identifier' %}</th>
<th>{% trans 'Date' %}</th>
<th>{% trans 'User' %}</th>
<th>{% trans 'Amount' %}</th>
<th colspan="2">{% trans 'Items' %}</th>
</tr>
</thead>
<tbody>
{% for object in object_list %}
<tr>
<td rowspan="{{object.items.all.count}}">{{object.order_id}}</td>
<td rowspan="{{object.items.all.count}}">{{object.start_date}}</td>
<td rowspan="{{object.items.all.count}}">{{object.user.first_name}} {{object.user.last_name}}</td>
<td rowspan="{{object.items.all.count}}">{{object.amount}} €</td>
{% for item in object.items.all %}
{% if not forloop.first %}<tr>{% endif %}
<td style="font-size: smaller">{{item.subject}}</td> <td style="font-size: smaller" class="price">{{item.amount}} €</td></tr>
{% endfor %}
{% if not object.items.all %}</tr>{% endif %}
{% endfor %}
</tbody>
</table>
{% if is_paginated %}
<p class="paginator">
{% if page_obj.has_previous %}
<a href="?page={{ page_obj.previous_page_number }}">&lt;&lt;</a>
{% else %}
<span>&lt;&lt;</span>
{% endif %}
&nbsp;
<span class="current">
{{ page_obj.number }} / {{ page_obj.paginator.num_pages }}
</span>
&nbsp;
{% if page_obj.has_next %}
<a href="?page={{ page_obj.next_page_number }}">&gt;&gt;</a>
{% else %}
<span>&gt;&gt;</span>
{% endif %}
</div>
{% endif %}
</div>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This site doesn't have any transaction yet.
{% endblocktrans %}
</div>
{% endif %}
{% endblock %}