{% extends 'leprikon/list.html' %}
{% load cms_tags i18n leprikon_tags %}

{% block list %}

{% if request.GET.PaymentOrderStatusID.0 == '3' %}
<div class="alert alert-success">{% trans 'Thank You, the online payment was successful. The confirmation will be available within several minutes.' %}</div>
{% elif request.GET.PaymentOrderStatusID.0 == '2' %}
<div class="alert alert-danger">{% trans 'Unfortunately, the online payment was not successful. Please, try it again or choose another payment method.' %}</div>
{% endif %}

<table class="table">
    <tr>
        <th>{% trans 'Date' %}</th>
        <th>{% trans 'Subject' %}</th>
        <th>{% trans 'Payment Type' %}</th>
        <th>{% trans 'Amount' %}</th>
        <th></th>
    </tr>
{% for payment in object_list %}
    <tr>
        <td>{{ payment.accounted.date }}</td>
        <td>{{ payment.registration }}</td>
        <td>{{ payment.payment_type_label }}</td>
        <td>{{ payment.amount | currency }}</td>
        <td>
            <a class="btn btn-primary btn-xs" href="{{ payment.get_absolute_url }}">
                <span class="glyphicon glyphicon-download" aria-hidden="true"></span>
                {% trans 'download' %}
            </a>
        </td>
    </tr>
{% empty %}
    <tr>
        <td colspan="5">{{ message_empty }}</td>
    </tr>
{% endfor %}
</table>
{% endblock %}
