1bd9ab505f937532c9f39f12c00032bc033c64f4
[django-pagination.git] / linaro_django_pagination / templates / pagination / pagination.html
1 {% if is_paginated %}
2 {% load i18n %}
3 <div class="pagination">
4   {% block previouslink %}
5   {% if page_obj.has_previous %}
6   <a href="?page{{ page_suffix }}={{ page_obj.previous_page_number }}{{ getvars }}" class="prev">{{ previous_link_decorator|safe }}{% trans "previous" %}</a>
7   {% else %}
8   {% if display_disabled_previous_link %}
9   <span class="disabled prev">{{ previous_link_decorator|safe }}{% trans "previous" %}</span>
10   {% endif %}
11   {% endif %}
12   {% endblock previouslink %}
13   {% block pagelinks %}
14   {% if display_page_links %}
15   {% for page in pages %}
16   {% if page %}
17   {% ifequal page page_obj.number %}
18   <span class="current page">{{ page }}</span>
19   {% else %}
20   <a href="?page{{ page_suffix }}={{ page }}{{ getvars }}" class="page">{{ page }}</a>
21   {% endifequal %}
22   {% else %}
23   ...
24   {% endif %}
25   {% endfor %}
26   {% endif %}
27   {% endblock pagelinks %}
28   {% block nextlink %}
29   {% if page_obj.has_next %}
30   <a href="?page{{ page_suffix }}={{ page_obj.next_page_number }}{{ getvars }}" class="next">{% trans "next" %}{{ next_link_decorator|safe }}</a>
31   {% else %}
32   {% if display_disabled_next_link %}
33   <span class="disabled next">{% trans "next" %}{{ next_link_decorator|safe }}</span>
34   {% endif %}
35   {% endif %}
36   {% endblock nextlink %}
37 </div>
38 {% endif %}