summaryrefslogtreecommitdiff
path: root/lib/grappelli/templates/admin/pagination.html
blob: ecd0859a87c5c7a37e985c4fa7008ef4d196504e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{% load admin_list i18n %}

{% spaceless %}
    <div class="module pagination">
        <ul class="pagination">
            {% if cl.result_count != cl.full_result_count %}
                <li class="results"><span>
                    {% blocktrans count cl.result_count as counter %}1 result{% plural %}{{ counter }} results{% endblocktrans %}
                </span></li>
            {% endif %}
            <li class="results">
                {% if cl.result_count != cl.full_result_count or cl.show_all %}
                    <a href="?{% if cl.is_popup %}pop=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>
            {% if pagination_required %}
                {% for i in page_range %}
                    {% ifequal i "." %}
                        <li class="separator"><span>...</span></li>
                    {% else %}
                        <li>{% paginator_number cl i %}</li>
                    {% endifequal %}
                {% endfor %}
            {% endif %}
            {% if show_all_url %}<li class="showall"><a href="{{ show_all_url }}">{% trans 'Show all' %}</a></li>{% endif %}
        </ul><br clear="all" />
    </div>
{% endspaceless %}