mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-12-28 01:28:51 +01:00
I was over thinking that
This commit is contained in:
parent
a85223e7a5
commit
9461705591
@ -47,13 +47,12 @@
|
|||||||
<li class="disabled"><span>««</span></li>
|
<li class="disabled"><span>««</span></li>
|
||||||
<li class="disabled"><span>«</span></li>
|
<li class="disabled"><span>«</span></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<!-- Page - 5 to page + 5 controls -->
|
<!-- other pages, set thresh to the number to show before and after active -->
|
||||||
{% with ''|center:11 as range %}
|
{% with 5 as thresh %}
|
||||||
{% for _ in range %}
|
{% for i in ticket_list.paginator.page_range %}
|
||||||
{% with ticket_list.number|add:forloop.counter|add:"-5" as i %}
|
|
||||||
{% if ticket_list.number == i %}
|
{% if ticket_list.number == i %}
|
||||||
<li class="active"><span>{{ i }} <span class="sr-only">(current)</span></span></li>
|
<li class="active"><span>{{ i }} <span class="sr-only">(current)</span></span></li>
|
||||||
{% else if i in ticket_list.paginator.page_range %}
|
{% else if i <= ticket_list.number|add:5 and i >= ticket_list.number|-5 %}
|
||||||
<li><a href="?{{ page_var }}={{ i }}">{{ i }}</a></li>
|
<li><a href="?{{ page_var }}={{ i }}">{{ i }}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
Loading…
Reference in New Issue
Block a user