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

68 lines
2.6 KiB
HTML

{% extends "lingo/manager_base.html" %}
{% load i18n %}
{% block appbar %}
<h2>{% trans 'Transactions' %}</h2>
<span class="actions">
<a href="{% url 'lingo-manager-payment-error-list' %}">{% trans 'Payments in error' %}</a>
<a href="{% url 'lingo-manager-paymentbackend-list' %}">{% trans 'Payment backends' %}</a>
<a href="{% url 'lingo-manager-regie-list' %}">{% trans 'Regies' %}</a>
<a rel="popup" href="{% url 'lingo-manager-transactions-download' %}" data-autoclose-dialog="true">{% trans 'download CSV' %}</a>
</span>
{% endblock %}
{% block content %}
<div>
<form>
<p>
{{ form.regie }} <input name="q" type="search" value="{{ form.cleaned_data.q }}"> <button>{% trans 'Search' %}</button>
<span class="help_text">{% trans "(supports order identifiers, transaction identifiers, and dates)" %}</span>
</p>
</form>
{% if object_list %}
<table class="main">
<thead>
<tr>
<th>{% trans 'Order Identifier' %}</th>
<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 %}
{% with object.prefetched_items|length|default:1 as nb_items %}
<tr>
<td rowspan="{{ nb_items }}">{{object.order_id}}</td>
<td rowspan="{{ nb_items }}">{{object.bank_transaction_id}}</td>
<td rowspan="{{ nb_items }}">{{object.start_date}}</td>
<td rowspan="{{ nb_items }}">{{object.get_user_name}}</td>
<td rowspan="{{ nb_items }}">{{object.amount}} €</td>
{% for item in object.prefetched_items %}
{% 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>
{% empty %}
</tr>
{% endfor %}
{% endwith %}
{% endfor %}
</tbody>
</table>
{% include "gadjo/pagination.html" %}
{% else %}
<div class="big-msg-info">
{% if form.cleaned_data.q or form.cleaned_data.regie %}
{% trans "No transactions found matching the current search." %}
{% else %}
{% trans "This site doesn't have any transaction yet." %}
{% endif %}
</div>
{% endif %}
</div>
{% endblock %}