From e8fc121974d30b2b8d0999f78f3bf322fbf5699d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Valentov=C3=A1?= <git@imaniti.org> Date: Wed, 28 Aug 2024 14:38:37 +0200 Subject: [PATCH] hide candidates switch if there are no other switches --- .../includes/molecules/program/program_block.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/shared/templates/styleguide2/includes/molecules/program/program_block.html b/shared/templates/styleguide2/includes/molecules/program/program_block.html index 95aba9a5..6437be41 100644 --- a/shared/templates/styleguide2/includes/molecules/program/program_block.html +++ b/shared/templates/styleguide2/includes/molecules/program/program_block.html @@ -83,11 +83,13 @@ v-slot="{ isCurrentSecondaryView, toggleSecondaryView }" > <div class="bg-white py-12 container--wide text-center"> - <a - @click="toggleSecondaryView('candidates')" - class="switch__item--program inline-block" - :class="{'switch__item--active': isCurrentSecondaryView('candidates')}" - >{{ self.candidates_title }}</a> + {% if self.program or self.other_views or self.tab_links %} + <a + @click="toggleSecondaryView('candidates')" + class="switch__item--program inline-block" + :class="{'switch__item--active': isCurrentSecondaryView('candidates')}" + >{{ self.candidates_title }}</a> + {% endif %} {% if self.program %} <a -- GitLab