From 524922e67fd3887eaf587c45c9a87c5d93544592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Mon, 9 Dec 2024 19:51:57 +0100 Subject: [PATCH] Hide attended column in participants in template --- .../side_panel/participants_dialog.html.erb | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/modules/meeting/app/components/meetings/side_panel/participants_dialog.html.erb b/modules/meeting/app/components/meetings/side_panel/participants_dialog.html.erb index 2530eaa4a4f8..5fd081e9c14f 100644 --- a/modules/meeting/app/components/meetings/side_panel/participants_dialog.html.erb +++ b/modules/meeting/app/components/meetings/side_panel/participants_dialog.html.erb @@ -24,8 +24,10 @@ render(Primer::Beta::Text.new(font_weight: :emphasized)) { t("description_invite").capitalize } end - header.with_column(style: "width: 90px;", text_align: :center) do - render(Primer::Beta::Text.new(font_weight: :emphasized)) { t("description_attended").capitalize } + unless @meeting.template? + header.with_column(style: "width: 90px;", text_align: :center) do + render(Primer::Beta::Text.new(font_weight: :emphasized)) { t("description_attended").capitalize } + end end end end @@ -71,12 +73,14 @@ # unchecked_value: "" # )) end - existing_participant.with_column(style: "width: 90px;", text_align: :center) do - styled_check_box_tag "meeting[participants_attributes][][attended]", - value = 1, - checked = participant.attended?, - id: "checkbox_attended_#{participant.user.id}", - disabled: !@meeting.editable? + unless @meeting.template? + existing_participant.with_column(style: "width: 90px;", text_align: :center) do + styled_check_box_tag "meeting[participants_attributes][][attended]", + value = 1, + checked = participant.attended?, + id: "checkbox_attended_#{participant.user.id}", + disabled: !@meeting.editable? + end end end end @@ -99,12 +103,14 @@ disabled: !@meeting.editable? end - new_participant.with_column(style: "width: 90px;", text_align: :center) do - styled_check_box_tag "meeting[participants_attributes][][attended]", - value = "1", - checked = false, - id: "checkbox_attended_#{user.id}", - disabled: !@meeting.editable? + unless @meeting.template? + new_participant.with_column(style: "width: 90px;", text_align: :center) do + styled_check_box_tag "meeting[participants_attributes][][attended]", + value = "1", + checked = false, + id: "checkbox_attended_#{user.id}", + disabled: !@meeting.editable? + end end end end