Merge branch 'more_customizations'
[django-pagination.git] / pagination / templates / pagination / default.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 }}{{ hashtag }}" 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 }}{{ hashtag }}" 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 }}{{ hashtag }}" 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 %}