Skip to content

Commit

Permalink
Merge pull request #123 from nossas/fix/filter-city-pagination
Browse files Browse the repository at this point in the history
Fix: Adiciona filter_city nos parametros da URL dentro da Paginação
  • Loading branch information
miguelzinh3 authored Sep 27, 2023
2 parents fb18520 + 1af3ca4 commit 442a49d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/eleicao/templates/eleicao/plugins/candidate_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ <h1 class="mb-3 text-4xl md:text-6xl">Conheça as candidaturas</h1>
{% if page_obj.number == page_num %}
<li><button class="join-item btn btn-md btn-active">{{ page_num }} </button></li>
{% elif page_num >= page_obj.number|add:"-2" and page_num <= page_obj.number|add:"2" %}
<li><a href="?page={{ page_num }}{% if filter_state %}&uf={{filter_state}}{% endif %}" class="join-item btn btn-md">{{ page_num }}</a></li>
<li><a href="?page={{ page_num }}{% if filter_state %}&uf={{filter_state}}{% endif %}{% if filter_city %}&city={{filter_city}}{% endif %}" class="join-item btn btn-md">{{ page_num }}</a></li>
{% endif %}
{% endfor %}

{% if page_obj.has_next %}
<li><a href="?page={{ page_obj.next_page_number }}{% if filter_state %}&uf={{filter_state}}{% endif %}" class="join-item btn">&raquo;</a></li>
<li><a href="?page={{ page_obj.next_page_number }}{% if filter_state %}&uf={{filter_state}}{% endif %}{% if filter_city %}&city={{filter_city}}{% endif %}" class="join-item btn">&raquo;</a></li>
{% else %}
<li class="join-item btn btn-disabled"><span>&raquo;</span></li>
{% endif %}
Expand Down

0 comments on commit 442a49d

Please sign in to comment.