Files
pretix_original/src/pretix/control/templates/pretixcontrol/pagination.html
2021-07-24 12:51:21 +02:00

51 lines
2.1 KiB
HTML

{% load i18n %}
{% load humanize %}
{% load urlreplace %}
{% if is_paginated or page_obj.paginator.count > 1 %}
<nav class="text-center pagination-container">
<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|intcomma %}
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|intcomma %}
{{ count }} elements
{% endblocktrans %}
</a></li>
{% endif %}
{% endif %}
</ul>
{% if page_size %}
<div class="clearfix">
<small>
{% trans "Show per page:" %}
</small>
<a href="?{% url_replace request "page_size" "25" "page" "1" %}">
{% if page_size == 25 %}<strong>{% endif %}25{% if page_size == 25 %}</strong>{% endif %}</a> |
<a href="?{% url_replace request "page_size" "50" "page" "1" %}">
{% if page_size == 50 %}<strong>{% endif %}50{% if page_size == 50 %}</strong>{% endif %}</a> |
<a href="?{% url_replace request "page_size" "100" "page" "1" %}">
{% if page_size == 100 %}<strong>{% endif %}100{% if page_size == 100 %}</strong>{% endif %}</a>
</div>
{% endif %}
</nav>
{% endif %}