Pagination in all ListViews

This commit is contained in:
Raphael Michel
2015-05-24 14:07:51 +02:00
parent 14d1a12a91
commit 79dfe7a084
12 changed files with 42 additions and 26 deletions

View File

@@ -0,0 +1,26 @@
{% load i18n %}
{% if is_paginated %}
<nav class="text-center">
<ul class="pagination">
{% if page_obj.has_previous %}
<li>
<a href="?page={{ page_obj.previous_page_number }}">
<span>&laquo;</span>
</a>
</li>
{% endif %}
<li class="page-current"><a>
{% blocktrans trimmed with page=page_obj.number of=page_obj.paginator.num_pages %}
Page {{ page }} of {{ of }}
{% endblocktrans %}
</a></li>
{% if page_obj.has_next %}
<li>
<a href="?page={{ page_obj.next_page_number }}">
<span>&raquo;</span>
</a>
</li>
{% endif %}
</ul>
</nav>
{% endif %}