{% extends 'base.html' %}
{% load i18n %}

{% block title %}{{ pay_gw.title }}{% endblock %}

{% block breadcrumb %}
    <ol class="breadcrumb">
        <li><span class="glyphicon glyphicon-home"></span></li>
        <li><a href="{% url 'finapp:alltime_gateways_list' %}">{% trans 'Payment system' %}</a></li>
        <li class="active">{% trans 'Payment history' %}</li>
    </ol>
{% endblock %}

{% block page-header %}{{ pay_gw.title }}{% endblock %}


{% block main %}

    <table class="table table-striped table-bordered">
        <thead>
        <tr>
            <th>{% trans 'User' %}</th>
            <th>{% trans 'Pay id' %}</th>
            <th>{% trans 'Date' %}</th>
            <th>{% trans 'Cost' %}</th>
            <th>{% trans 'Trade point' %}</th>
            <th>{% trans 'Receipt num' %}</th>
        </tr>
        </thead>
        <tbody>
        {% for pay in object_list %}
            <tr>
                <td>
                    {% if pay.abon %}
                        <a href="{{ pay.abon.get_absolute_url }}">{{ pay.abon }}</a>
                    {% else %}
                        {% trans 'Deleted' %}
                    {% endif %}
                </td>
                <td>{{ pay.pay_id }}</td>
                <td>{{ pay.date_add|date:'D d E Y H:i:s' }}</td>
                <td>{{ pay.summ }}</td>
                <td>{{ pay.trade_point|default_if_none:'&mdash;' }}</td>
                <td>{{ pay.receipt_num }}</td>
            </tr>
        {% empty %}
            <tr>
                <td colspan="6">{% trans 'Payment history is empty' %}</td>
            </tr>
        {% endfor %}
        </tbody>
    </table>

{% endblock %}
