{% load admin_list i18n %}
{% spaceless %}
<nav class="grp-pagination">
    <header style="display:none"><h1>Pagination</h1></header>
    <ul>
        {% if cl.show_full_result_count %}
            {% if cl.result_count != cl.full_result_count %}
                <li class="grp-results"><span>
                    {% blocktrans count cl.result_count as counter %}{{ counter }} result{% plural %}{{ counter }} results{% endblocktrans %}
                </span></li>
            {% endif %}
                <li class="grp-results">
                    {% if cl.result_count != cl.full_result_count or cl.show_all %}
                        <a href="?{% if cl.is_popup %}_popup=1{% endif %}" class="total">{% blocktrans with cl.full_result_count as full_result_count %}{{ full_result_count }} total{% endblocktrans %}</a>
                    {% else %}
                        <span>{% blocktrans with cl.full_result_count as full_result_count %}{{ full_result_count }} total{% endblocktrans %}</span>
                    {% endif %}
                </li>
        {% else %}
            <li class="grp-results">
                <span>
                    {% blocktrans count cl.result_count as counter %}
                        {{ counter }} result
                    {% plural %}
                        {{ counter }} results
                    {% endblocktrans %}
                </span>
            </li>
            <li class="grp-results">
                <a href="?{% if cl.is_popup %}_popup=1{% endif %}" class="total">
                    {% trans "Show all" %}
                </a>
            </li>
        {% endif %}
        {% if pagination_required %}
            {% for i in page_range %}
                {% ifequal i "." %}
                    <li class="grp-separator"><span>...</span></li>
                {% else %}
                    <li>{% paginator_number cl i %}</li>
                {% endifequal %}
            {% endfor %}
        {% endif %}
        {% if show_all_url %}<li class="grp-showall"><a href="{{ show_all_url }}">{% trans 'Show all' %}</a></li>{% endif %}
    </ul>
</nav>
{% endspaceless %}