Created
October 15, 2012 17:42
-
-
Save bmihelac/3893918 to your computer and use it in GitHub Desktop.
Paginator with window options, for pinax-theme-bootstrap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% load i18n %} | |
{% load paginator_helper_tags %} | |
{% if is_paginated %} | |
{% page_range page_obj as page_range %} | |
<div class="pagination"> | |
<ul> | |
{% if page_obj.has_previous %} | |
<li class="prev"> | |
<a href="?page={{ page_obj.previous_page_number }}{{ getvars }}{{ hashtag }}">← {% trans "Previous" %}</a> | |
</li> | |
{% else %} | |
<li class="prev disabled"><a>← {% trans "Previous" %}</a></li> | |
{% endif %} | |
{% for page in page_range %} | |
{% if page %} | |
<li class="{% ifequal page page_obj.number %}active{% endifequal %}"><a href="?page={{ page }}{{ getvars }}{{ hashtag }}">{{ page }}</a></li> | |
{% else %} | |
<li class="disabled"><a href="#">…</a></li> | |
{% endif %} | |
{% endfor %} | |
{% if page_obj.has_next %} | |
<li class="next"><a href="?page={{ page_obj.next_page_number }}{{ getvars }}{{ hashtag }}">{% trans "Next" %} →</a></li> | |
{% else %} | |
<li class="next disabled"><a>{% trans "Next" %} →</a></li> | |
{% endif %} | |
</ul> | |
</div> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment