631075a93e01a90e94f93a828e5d0151eccf2273
[django-pagination.git] / pagination / templates / pagination / pagination.html
1 {% if is_paginated %}
2 <div class="pagination">
3     {% if page_obj.has_previous %}<a href="?page={{ page_obj.previous_page_number }}" class="prev">&lsaquo;&lsaquo; previous</a> {% else %}<span class="disabled prev">&lsaquo;&lsaquo; previous</span> {% endif %}
4     {% for page in pages %}{% if page %}{% ifequal page page_obj.number %}<span class="current page">{{ page }}</span> {% else %}<a href="?page={{ page }}" class="page">{{ page }}</a> {% endifequal %}{% else %} ... {% endif %}{% endfor %}
5     {% if page_obj.has_next %}<a href="?page={{ page_obj.next_page_number }}" class="next">next &rsaquo;&rsaquo;</a>{% else %}<span class="disabled next">next &rsaquo;&rsaquo;</span>{% endif %}
6 </div>
7 {% endif %}