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 %}