mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
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.
This commit is contained in:
committed by
Raphael Michel
parent
579d71e95b
commit
3458d64850
@@ -46,6 +46,7 @@
|
|||||||
<button class="btn btn-primary" type="submit">{% trans "Filter" %}</button>
|
<button class="btn btn-primary" type="submit">{% trans "Filter" %}</button>
|
||||||
</form>
|
</form>
|
||||||
</p>
|
</p>
|
||||||
|
{% include "pretixcontrol/pagination.html" %}
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-condensed table-hover">
|
<table class="table table-condensed table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
|
|||||||
@@ -33,6 +33,6 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
{% include "pretixcontrol/pagination.html" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% include "pretixcontrol/pagination.html" %}
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -57,6 +57,7 @@
|
|||||||
<button class="btn btn-primary" type="submit">{% trans "Filter" %}</button>
|
<button class="btn btn-primary" type="submit">{% trans "Filter" %}</button>
|
||||||
</form>
|
</form>
|
||||||
</p>
|
</p>
|
||||||
|
{% include "pretixcontrol/pagination.html" %}
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-condensed table-hover">
|
<table class="table table-condensed table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load urlreplace %}
|
{% load urlreplace %}
|
||||||
{% if is_paginated %}
|
<nav class="text-center">
|
||||||
<nav class="text-center">
|
<ul class="pagination">
|
||||||
<ul class="pagination">
|
{% if is_paginated %}
|
||||||
{% if page_obj.has_previous %}
|
{% if page_obj.has_previous %}
|
||||||
<li>
|
<li>
|
||||||
<a href="?{% url_replace request 'page' page_obj.previous_page_number %}">
|
<a href="?{% url_replace request 'page' page_obj.previous_page_number %}">
|
||||||
@@ -11,8 +11,8 @@
|
|||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li class="page-current"><a>
|
<li class="page-current"><a>
|
||||||
{% blocktrans trimmed with page=page_obj.number of=page_obj.paginator.num_pages %}
|
{% blocktrans trimmed with page=page_obj.number of=page_obj.paginator.num_pages count=page_obj.paginator.count %}
|
||||||
Page {{ page }} of {{ of }}
|
Page {{ page }} of {{ of }} ({{ count }} elements)
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
</a></li>
|
</a></li>
|
||||||
{% if page_obj.has_next %}
|
{% if page_obj.has_next %}
|
||||||
@@ -22,6 +22,14 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
{% else %}
|
||||||
</nav>
|
{% if page_obj.paginator.count > 1 %}
|
||||||
{% endif %}
|
<li class="page-current"><a>
|
||||||
|
{% blocktrans trimmed with count=page_obj.paginator.count %}
|
||||||
|
{{ count }} elements
|
||||||
|
{% endblocktrans %}
|
||||||
|
</a></li>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|||||||
Reference in New Issue
Block a user