{% extends 'django_tables2/table.html' %}
{% load django_tables2 %}
{% load i18n %}

{% block table.thead %}
<caption>
    {% block table.caption %}
        <h3 class="float-left">
            {% if table.icon %}
                <i class="{{ table.icon }}"></i>
            {% endif %}
            {{ table.get_caption_display }}
        </h3>
    {% endblock %}
</caption>
<thead>
    <tr>
    {% for column in table.columns %}
        {% if column.orderable %}
        <th {{ column.attrs.th.as_html }}><a href="{% querystring table.prefixed_order_by_field=column.order_by_alias.next %}">{{ column.header }} <span></span></a></th>
        {% else %}
        <th {{ column.attrs.th.as_html }}>{{ column.header }}</th>
        {% endif %}
    {% endfor %}
    </tr>
</thead>
{% endblock table.thead %}

{% block pagination %}
{% with page_obj=table.page paginator=table.paginator %}
    {% include "oscar/dashboard/partials/pagination.html" %}
{% endwith %}
{% endblock pagination %}
