From d662d882a1315491db3c4facb301784c3a2e0e50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Valentov=C3=A1?= <git@imaniti.org> Date: Mon, 22 Jul 2024 16:11:28 +0200 Subject: [PATCH] fix display --- district/blocks.py | 1 + .../includes/molecules/program/program_block.html | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/district/blocks.py b/district/blocks.py index ec1363dc..28350a35 100644 --- a/district/blocks.py +++ b/district/blocks.py @@ -402,6 +402,7 @@ class ProgramGroupWithCandidatesBlock(StructBlock): other_views = ListBlock( ProgramGroupWithCandidatesOtherViewBlock(), label="Ostatní záložky", + min_num=0, help_text=( "Použitelné např. pro zobrazení volebních novin na separátní " "záložce stránky s programem." diff --git a/shared/templates/styleguide2/includes/molecules/program/program_block.html b/shared/templates/styleguide2/includes/molecules/program/program_block.html index c98ed91d..1219096c 100644 --- a/shared/templates/styleguide2/includes/molecules/program/program_block.html +++ b/shared/templates/styleguide2/includes/molecules/program/program_block.html @@ -81,21 +81,21 @@ <div class="bg-white py-12 container--wide text-center"> <a @click="toggleSecondaryView('candidates')" - class="switch__item--program" + class="switch__item--program inline-block" :class="{'switch__item--active': isCurrentSecondaryView('candidates')}" >Kandidáti</a> <a @click="toggleSecondaryView('program')" - class="switch__item--program" + class="switch__item--program inline-block" :class="{'switch__item--active': isCurrentSecondaryView('program')}" >Program</a> {% for other_view in self.other_views %} <a - @click="toggleSecondaryView('program-view-{{ forloop.counter0 }}')" - class="switch__item--program" - :class="{'switch__item--active': isCurrentSecondaryView('program-view-{{ forloop.counter0 }}')}" + @click="toggleSecondaryView('extra-view-{{ forloop.counter0 }}')" + class="switch__item--program inline-block" + :class="{'switch__item--active': isCurrentSecondaryView('extra-view-{{ forloop.counter0 }}')}" >{{ other_view.title }}</a> {% endfor %} </div> @@ -118,7 +118,7 @@ </template> {% for other_view in self.other_views %} - <template v-if="isCurrentSecondaryView('program-view-{{ forloop.counter0 }}')"> + <template v-if="isCurrentSecondaryView('extra-view-{{ forloop.counter0 }}')"> <div class="flex flex-col gap-4 mb-4 xl:mb-20 container--wide"> {% for child_block in other_view.child_blocks %} {% include_block child_block %} -- GitLab