Files
pretix_original/src/pretix/control/templates/pretixcontrol/pagination.html
Tobias Kunze 3458d64850 Add a count of elements to pagination elements (#219)
Also, add a second, upper pagination element to orders and attendees
list sites as those tend to get long.
2016-08-29 19:19:57 +02:00

36 lines
1.3 KiB
HTML

{% load i18n %}
{% load urlreplace %}
<nav class="text-center">
<ul class="pagination">
{% if is_paginated %}
{% if page_obj.has_previous %}
<li>
<a href="?{% url_replace request '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 count=page_obj.paginator.count %}
Page {{ page }} of {{ of }} ({{ count }} elements)
{% endblocktrans %}
</a></li>
{% if page_obj.has_next %}
<li>
<a href="?{% url_replace request 'page' page_obj.next_page_number %}">
<span>&raquo;</span>
</a>
</li>
{% endif %}
{% else %}
{% if page_obj.paginator.count > 1 %}
<li class="page-current"><a>
{% blocktrans trimmed with count=page_obj.paginator.count %}
{{ count }} elements
{% endblocktrans %}
</a></li>
{% endif %}
{% endif %}
</ul>
</nav>