Show current page and total pages for generic lists sub template

This commit is contained in:
Roberto Rosario
2011-03-03 21:57:41 -04:00
parent 3c54afcdac
commit 3f71ee1a06

View File

@@ -15,7 +15,7 @@
<div class="content">
<h2 class="title">
{% ifnotequal page_obj.paginator.num_pages 1 %}
{% blocktrans with page_obj.start_index as start and page_obj.end_index as end and page_obj.paginator.object_list|length as total %}List of {{ title }} ({{ start }} - {{ end }} out of {{ total }}){% endblocktrans %}
{% blocktrans with page_obj.start_index as start and page_obj.end_index as end and page_obj.paginator.object_list|length as total and page_obj.number as page_number and page_obj.paginator.num_pages as total_pages %}List of {{ title }} ({{ start }} - {{ end }} out of {{ total }}) (Page {{ page_number }} of {{ total_pages }}){% endblocktrans %}
{% else %}
{% blocktrans with page_obj.paginator.object_list|length as total %}List of {{ title }} ({{ total }}){% endblocktrans %}
{% endifnotequal %}