From 9461705591a0ff4567e78cde141786698141915e Mon Sep 17 00:00:00 2001 From: Tom Bernens Date: Mon, 1 Jun 2020 17:47:54 -0700 Subject: [PATCH] I was over thinking that --- helpdesk/templates/helpdesk/include/tickets.html | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/helpdesk/templates/helpdesk/include/tickets.html b/helpdesk/templates/helpdesk/include/tickets.html index 1afa835a..b0fadca9 100644 --- a/helpdesk/templates/helpdesk/include/tickets.html +++ b/helpdesk/templates/helpdesk/include/tickets.html @@ -47,13 +47,12 @@
  • ««
  • «
  • {% endif %} - - {% with ''|center:11 as range %} - {% for _ in range %} - {% with ticket_list.number|add:forloop.counter|add:"-5" as i %} + + {% with 5 as thresh %} + {% for i in ticket_list.paginator.page_range %} {% if ticket_list.number == i %}
  • {{ i }} (current)
  • - {% else if i in ticket_list.paginator.page_range %} + {% else if i <= ticket_list.number|add:5 and i >= ticket_list.number|-5 %}
  • {{ i }}
  • {% endif %} {% endfor %}