Created
December 20, 2011 13:07
-
-
Save gilsondev/1501516 to your computer and use it in GitHub Desktop.
Template do plugin django-pagination adaptado para o Twitter 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
{% if is_paginated %} | |
{% load i18n %} | |
<div class="pagination"> | |
<ul> | |
{% if page_obj.has_previous %} | |
<li class="prev"><a href="?page={{ page_obj.previous_page_number }}{{ getvars }}">‹‹ {% trans "previous" %}</a></li> | |
{% else %} | |
<li class="prev disabled"><a href="#">‹‹ {% trans "previous" %}</a></li> | |
{% endif %} | |
{% for page in pages %} | |
{% if page %} | |
{% ifequal page page_obj.number %} | |
<li class="active"><a href="#">{{ page }}</a></li> | |
{% else %} | |
<li><a href="?page={{ page }}{{ getvars }}">{{ page }}</a></li> | |
{% endifequal %} | |
{% else %} | |
... | |
{% endif %} | |
{% endfor %} | |
{% if page_obj.has_next %} | |
<li class="next"><a href="?page={{ page_obj.next_page_number }}{{ getvars }}">{% trans "next" %} ››</a></li> | |
{% else %} | |
<li class="next disabled"><a href="#">{% 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