{% load i18n %}
{% load lfs_tags %}

<form action="{% url lfs_set_cart_filters %}"
      method="POST">

    <table class="filters">
        <tr>
            <td class="discreet">{% trans "Pages" %}</td>
            <td></td>
            <td class="discreet">{% trans "Start" %}</td>
            <td class="discreet">{% trans "End" %}</td>
        </tr>
        <tr>
    <td>
        <div class="navigation-pages">
            {% if page.has_previous %}
                <a class="ajax-link"
                   href="{% url lfs_set_carts_page %}?page=1">
                    <img src="{{ STATIC_URL }}icons/resultset_first.png"
                         alt="{% trans 'First' %}"
                         title="{% trans 'First' %}" />
                </a>
                <a class="ajax-link"
                   href="{% url lfs_set_carts_page %}?page={{ page.previous_page_number }}">
                    <img src="{{ STATIC_URL }}icons/resultset_previous.png"
                         alt="{% trans 'Previous' %}"
                         title="{% trans 'Previous' %}" />
                </a>
            {% else %}
                <img src="{{ STATIC_URL }}icons/resultset_first.png"
                     alt="{% trans 'First' %}"
                     title="{% trans 'First' %}" />
                <img src="{{ STATIC_URL }}icons/resultset_previous.png"
                     alt="{% trans 'Previous' %}"
                     title="{% trans 'Previous' %}" />
            {% endif %}

            {{ page.number }} {% trans "of" %} {{ paginator.num_pages }}

            {% if page.has_next %}
                <a class="ajax-link"
                   href="{% url lfs_set_carts_page %}?page={{ page.next_page_number }}">
                    <img src="{{ STATIC_URL }}icons/resultset_next.png"
                         alt="{% trans 'Next' %}"
                         title="{% trans 'Next' %}" />
                </a>
                <a class="ajax-link"
                   href="{% url lfs_set_carts_page %}?page={{ paginator.num_pages }}">
                    <img src="{{ STATIC_URL }}icons/resultset_last.png"
                         alt="{% trans 'Last' %}"
                         title="{% trans 'Last' %}" />
                </a>

            {% else %}
                <span>
                    <img src="{{ STATIC_URL }}icons/resultset_next.png"
                         alt="{% trans 'Next' %}"
                         title="{% trans 'Next' %}" />
                </span>
                <span>
                    <img src="{{ STATIC_URL }}icons/resultset_last.png"
                         alt="{% trans 'Last' %}"
                         title="{% trans 'Last' %}" />
                </span>
            {% endif %}
        </div>

    </td>
    <td>
        <a href="{% url lfs_set_cart_filters_date %}?start=0&amp;end=0"
           class="ajax-link" title="{% trans "Today" %}">T</a>
        <a href="{% url lfs_set_cart_filters_date %}?start=1&amp;end=1"
           class="ajax-link" title="{% trans "Yesterday" %}">Y</a>
        <a href="{% url lfs_set_cart_filters_date %}?start=7&amp;end=0"
           class="ajax-link" title="{% trans "Week" %}">W</a>
    </td>
    <td>
        <input class="date-picker"
               type="text"
               name="start"
               value="{{ start }}">
    </td>
    <td>

        <input class="date-picker"
               type="text"
               name="end"
               value="{{ end }}">
    </td>
    <td>
        <input type="submit"
               class="ajax-save-button" />

        <a href="{% url lfs_reset_cart_filters %}"
           class="ajax-link reset">&nbsp;</a>
    </td>
    </tr>
    </table>
</form>
