reduce this to only ever show 11 pages (5 before and 5 after the current + the current))

This commit is contained in:
Tom Bernens 2020-06-01 16:49:13 -07:00
parent e1b9906fd0
commit 050a65e6df

View File

@ -44,7 +44,9 @@
{% else %}
<li class="disabled"><span>&laquo;</span></li>
{% endif %}
{% for i in ticket_list.paginator.page_range %}
{% with ''|center:11 as range %}
{% for _ in range %}
{% with i = ticket_list.number + (forloop.counter-5) %}
{% if ticket_list.number == i %}
<li class="active"><span>{{ i }} <span class="sr-only">(current)</span></span></li>
{% else %}