From 470034ce0e7b40ca5ae3b10b02a5998753ce719b Mon Sep 17 00:00:00 2001 From: Mario Sergio Date: Fri, 6 Sep 2024 14:48:14 -0300 Subject: [PATCH] fix(vote): Adjusted pagination layout at profile search --- .../candidature/candidature_search.html | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/app/org_eleicoes/votepeloclima/candidature/templates/candidature/candidature_search.html b/app/org_eleicoes/votepeloclima/candidature/templates/candidature/candidature_search.html index bf1c3d23..e39e7eaa 100644 --- a/app/org_eleicoes/votepeloclima/candidature/templates/candidature/candidature_search.html +++ b/app/org_eleicoes/votepeloclima/candidature/templates/candidature/candidature_search.html @@ -85,11 +85,23 @@
Infelizmente nenhuma candidatura Page {{ page_obj.number }} of {{ page_obj.paginator.page_range }}. --> {% for page_number in page_obj.paginator.page_range %} -
  • - - {{ page_number }} - -
  • + {% if page_number == 1 or page_number == page_obj.paginator.num_pages %} +
  • + + {{ page_number }} + +
  • + {% elif page_number >= page_obj.number|add:'-3' and page_number <= page_obj.number|add:'3' %} +
  • + + {{ page_number }} + +
  • + {% elif page_number == page_obj.number|add:'-4' or page_number == page_obj.number|add:'4' %} +
  • + ... +
  • + {% endif %} {% endfor %}