diff options
Diffstat (limited to 'app/lib/pagination/templates/pagination/pagination.html')
-rw-r--r-- | app/lib/pagination/templates/pagination/pagination.html | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/lib/pagination/templates/pagination/pagination.html b/app/lib/pagination/templates/pagination/pagination.html new file mode 100644 index 0000000..0a7f9a4 --- /dev/null +++ b/app/lib/pagination/templates/pagination/pagination.html @@ -0,0 +1,9 @@ +{% load pagination_tags %}{% if is_paginated %} + <ul class="pages">{% if page_obj.has_previous %} + <li><a href="{% if prev_page == 1%}/{{request.base_path}}/{%else%}{% page_path prev_page %}{%endif%}" class="prev"> Newer</a></li>{% endif %}{% for page in pages %}{% if page %}{% if page == page_obj.number %} + <li class="current page">{{ page }}</li>{% else %} + <li><a href="{% if page == 1%}/{{request.base_path}}/{%else%}{% page_path page %}{%endif%}" class="page">{{ page }}</a></li>{% endif %}{% else %} + <li>...</li>{% endif %}{% endfor %}{% if page_obj.has_next %} + <li><a href="{% if use_page_path %}{% page_path next_page %}{% else %}?page={{ page_obj.next_page_number }}{{ getvars }}{% endif %}" class="next">Older</a></li> + {% endif %} + </ul>{% endif %} |