diff --git a/district/blocks.py b/district/blocks.py index ec1363dc07bd6498eccef1ed9e75c6db20bca91b..28350a3506b7c78b62c6f03d70dfb630e44b527e 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 c98ed91de6faa3ccba08500d0f15e0269aa0fb94..1219096cc3269bd62117fb6027544db92c9a4e2d 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 %}