From 2baee7c2456586a012df4b58b3ad5080593a7579 Mon Sep 17 00:00:00 2001 From: Pascal Zumkehr Date: Fri, 8 Mar 2024 17:50:10 +0100 Subject: [PATCH] Move event training_days to core, refs hitobito/hitobito_sac_cas#256 --- app/views/events/_additional_fields.html.haml | 8 ++++++++ app/views/events/_fields_pbs.html.haml | 2 +- app/views/events/_fields_youth.html.haml | 6 ------ app/views/events/_show_left_0_details.html.haml | 1 - app/views/events/_show_left_youth.html.haml | 6 ------ 5 files changed, 9 insertions(+), 14 deletions(-) create mode 100644 app/views/events/_additional_fields.html.haml delete mode 100644 app/views/events/_fields_youth.html.haml delete mode 100644 app/views/events/_show_left_youth.html.haml diff --git a/app/views/events/_additional_fields.html.haml b/app/views/events/_additional_fields.html.haml new file mode 100644 index 000000000..d29711ee1 --- /dev/null +++ b/app/views/events/_additional_fields.html.haml @@ -0,0 +1,8 @@ +-# Copyright (c) 2024, PBS. This file is part of +-# hitobito and licensed under the Affero General Public License version 3 +-# or later. See the COPYING file at the top-level directory or at +-# https://github.com/hitobito/hitobito. + +- entry.used?(:globally_visible) do + = f.labeled_boolean_field :globally_visible, + caption: t('events.form.caption_globally_visible', model_name: entry.model_name.human) diff --git a/app/views/events/_fields_pbs.html.haml b/app/views/events/_fields_pbs.html.haml index 5e0871c44..e3a794135 100644 --- a/app/views/events/_fields_pbs.html.haml +++ b/app/views/events/_fields_pbs.html.haml @@ -17,7 +17,7 @@ = f.labeled_text_area :express_fee - entry.used?(:training_days) do - = f.labeled_input_field(:training_days, maxlength: 10) + = f.labeled_input_field(:training_days, maxlength: 6) - entry.used?(:bsv_days) do = f.labeled_input_field :bsv_days diff --git a/app/views/events/_fields_youth.html.haml b/app/views/events/_fields_youth.html.haml deleted file mode 100644 index 93fadccf3..000000000 --- a/app/views/events/_fields_youth.html.haml +++ /dev/null @@ -1,6 +0,0 @@ --# Copyright (c) 2012-2015, Pfadibewegung Schweiz. This file is part of --# hitobito_pbs and licensed under the Affero General Public License version 3 --# or later. See the COPYING file at the top-level directory or at --# https://github.com/hitobito/hitobito_pbs. - --# overriden, content rendered elsewhere diff --git a/app/views/events/_show_left_0_details.html.haml b/app/views/events/_show_left_0_details.html.haml index db1044027..ec42b6872 100644 --- a/app/views/events/_show_left_0_details.html.haml +++ b/app/views/events/_show_left_0_details.html.haml @@ -31,4 +31,3 @@ %dl.dl-horizontal = labeled_attr(entry, :express_fee) if entry.express_fee.present? = labeled_attr(entry, :course_languages) if format_attr(entry, :course_languages).present? - = labeled_attr(entry, :training_days) if format_attr(entry, :training_days).present? diff --git a/app/views/events/_show_left_youth.html.haml b/app/views/events/_show_left_youth.html.haml deleted file mode 100644 index 1ed0e6d64..000000000 --- a/app/views/events/_show_left_youth.html.haml +++ /dev/null @@ -1,6 +0,0 @@ --# Copyright (c) 2012-2015, Pfadibewegung Schweiz. This file is part of --# hitobito_pbs and licensed under the Affero General Public License version 3 --# or later. See the COPYING file at the top-level directory or at --# https://github.com/hitobito/hitobito_pbs. - --# override from youth wagon, display info somewhere else