From d035a173e90a8de1985373c886ce182751d4282f Mon Sep 17 00:00:00 2001 From: Igor Santos Date: Fri, 30 Aug 2024 16:45:59 -0300 Subject: [PATCH 1/2] faet(vote): add pagination to Candidature Search --- .../static/scss/candidaturesearch.scss | 15 +++++++++++ .../candidature/candidature_search.html | 27 ++++++++++++++++--- .../candidature/views/filters.py | 1 + .../votepeloclima/static/scss/icons.scss | 18 +++++++++++++ 4 files changed, 58 insertions(+), 3 deletions(-) diff --git a/app/org_eleicoes/votepeloclima/candidature/static/scss/candidaturesearch.scss b/app/org_eleicoes/votepeloclima/candidature/static/scss/candidaturesearch.scss index ed940671..7bf3d4d2 100644 --- a/app/org_eleicoes/votepeloclima/candidature/static/scss/candidaturesearch.scss +++ b/app/org_eleicoes/votepeloclima/candidature/static/scss/candidaturesearch.scss @@ -119,6 +119,21 @@ legend.form-label { } } +.pagination { + --bs-pagination-bg: var(--bs-tertiary-bg); + --bs-pagination-color: var(--bs-secondary); + --bs-pagination-hover-color: var(--bs-secondary); + + --bs-pagination-active-color: var(--bs-tertiary-bg); + --bs-pagination-active-bg: var(--bs-secondary); + --bs-pagination-active-border-color: var(--bs-secondary); + --bs-pagination-focus-color: var(--bs-secondary); + + .page-link:focus { + box-shadow: none; + } +} + // Hide Inputs @media (max-width: 768px) { 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 856696a5..cf3371c8 100644 --- a/app/org_eleicoes/votepeloclima/candidature/templates/candidature/candidature_search.html +++ b/app/org_eleicoes/votepeloclima/candidature/templates/candidature/candidature_search.html @@ -55,9 +55,6 @@
{{ candidature.get_intended_position_display }} | {{ candidature.get_politic

{{ candidature.get_proposes_display|join:" / "|escape }}

- {% if candidature.is_collective_mandate %} - Candidatura Coletiva - {% endif %} {% endfor %} + diff --git a/app/org_eleicoes/votepeloclima/candidature/views/filters.py b/app/org_eleicoes/votepeloclima/candidature/views/filters.py index b485542e..be36652a 100644 --- a/app/org_eleicoes/votepeloclima/candidature/views/filters.py +++ b/app/org_eleicoes/votepeloclima/candidature/views/filters.py @@ -9,6 +9,7 @@ class CandidatureSearchView(ListView): model = Candidature template_name = "candidature/candidature_search.html" context_object_name = "candidatures" + paginate_by = 12 search_filter_fields = [ "legal_name", diff --git a/app/org_eleicoes/votepeloclima/static/scss/icons.scss b/app/org_eleicoes/votepeloclima/static/scss/icons.scss index 60d54943..9250f57d 100644 --- a/app/org_eleicoes/votepeloclima/static/scss/icons.scss +++ b/app/org_eleicoes/votepeloclima/static/scss/icons.scss @@ -329,4 +329,22 @@ background-repeat: no-repeat; display: inline-block; background-image: url('data:image/svg+xml,'); +} + +.ds-paginator-previous { + width: 12px; + height: 13px; + background-size: contain; + background-repeat: no-repeat; + display: inline-block; + background-image: url('data:image/svg+xml,'); +} + +.ds-paginator-next { + width: 12px; + height: 13px; + background-size: contain; + background-repeat: no-repeat; + display: inline-block; + background-image: url('data:image/svg+xml,'); } \ No newline at end of file From 54e028e5dd1b0e80844fb38a979af453943ef6bf Mon Sep 17 00:00:00 2001 From: Igor Santos Date: Fri, 30 Aug 2024 16:52:53 -0300 Subject: [PATCH 2/2] fix(vote): decrease font size on state city Card Candidature --- .../candidature/static/scss/candidaturesearch.scss | 4 ++++ .../candidature/templates/candidature/candidature_search.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/org_eleicoes/votepeloclima/candidature/static/scss/candidaturesearch.scss b/app/org_eleicoes/votepeloclima/candidature/static/scss/candidaturesearch.scss index 7bf3d4d2..fc0d44cd 100644 --- a/app/org_eleicoes/votepeloclima/candidature/static/scss/candidaturesearch.scss +++ b/app/org_eleicoes/votepeloclima/candidature/static/scss/candidaturesearch.scss @@ -117,6 +117,10 @@ legend.form-label { color: var(--bs-secondary); } } + + .state-city { + font-size: 12px; + } } .pagination { 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 cf3371c8..ba79e45e 100644 --- a/app/org_eleicoes/votepeloclima/candidature/templates/candidature/candidature_search.html +++ b/app/org_eleicoes/votepeloclima/candidature/templates/candidature/candidature_search.html @@ -45,7 +45,7 @@
Filtrar resul Foto de {{ candidature.legal_name }}
-

{{ candidature.get_state_display }} - {{ candidature.get_city_display }}

+

{{ candidature.get_state_display }} - {{ candidature.get_city_display }}

{{ candidature.ballot_name }}