{% load admin_list %}
{% load i18n %}
{% load custom_paginator %}
<p class="paginator">
    {% if pagination_required %}
        {% for i in page_range %}
            {% if cl.page_num == i %}
                <span class="this-page">{{ i }}</span>
            {% else %}
                <a href="?p={{ i }}{% for key, value in query_params.items %}{% if key != 'p' %}&{{ key }}={{ value }}{% endif %}{% endfor %}">{{ i }}</a>
            {% endif %}
        {% endfor %}
    {% endif %}
    {{ cl.result_count }} {% if cl.result_count == 1 %}{{ cl.opts.verbose_name }}{% else %}{{ cl.opts.verbose_name_plural }}{% endif %}
    {% if show_all_url %}<a href="{{ show_all_url }}" class="showall">{% trans 'Show all' %}</a>{% endif %}
    {% if cl.formset and cl.result_count %}<input type="submit" name="_save" class="default" value="{% trans 'Save' %}">{% endif %}
</p>
