OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Move Meeting Sidebar component to SidePanel
Oliver Güntherea53a59ddb2c
diff --git a/modules/meeting/app/components/_index.sass b/modules/meeting/app/components/_index.sassindex 3082e33be43..5589d7141ea 100644--- a/modules/meeting/app/components/_index.sass+++ b/modules/meeting/app/components/_index.sass@@ -1,4 +1,4 @@@import "./meeting_agenda_items/item_component/show_component.sass"@import "./meeting_agenda_items/form_component.sass"@import "./meeting_sections/header_component.sass"-@import "./meetings/sidebar/state_component.sass"+@import "./meetings/side_panel/state_component.sass"diff --git a/modules/meeting/app/components/meetings/show_component.html.erb b/modules/meeting/app/components/meetings/show_component.html.erbindex 38e4240339e..7b1d937fcd2 100644--- a/modules/meeting/app/components/meetings/show_component.html.erb+++ b/modules/meeting/app/components/meetings/show_component.html.erb@@ -33,7 +33,7 @@endcontent.with_sidebar(row_placement: :start, col_placement: :end) do- render(Meetings::SidebarComponent.new(meeting: @meeting))+ render(Meetings::SidePanelComponent.new(meeting: @meeting))endendenddiff --git a/modules/meeting/app/components/meetings/side_panel/attachments_component.html.erb b/modules/meeting/app/components/meetings/side_panel/attachments_component.html.erbnew file mode 100644index 00000000000..49d2aecbe61--- /dev/null+++ b/modules/meeting/app/components/meetings/side_panel/attachments_component.html.erb@@ -0,0 +1,34 @@+<%=+ component_wrapper do+ render(Primer::OpenProject::SidePanel::Section.new) do |section|+ section.with_title { t(:label_attachment_plural) }+ section.with_description { I18n.t('meeting.attachments.text') }+ section.with_counter { @meeting.attachments.count }++ flex_layout do |attachments_container|+ attachments_container.with_row(mt: 2) do+ resource = ::API::V3::Meetings::MeetingRepresenter.new(@meeting, current_user: User.current, embed_links: false)+ helpers.list_attachments(resource,+ inputs: {+ allowUploading: true,+ showTimestamp: false,+ externalUploadButton: "#meetings-add-attachments"+ })+ end++ attachments_container.with_row(mt: 1) do+ render(Primer::Beta::Button.new(+ scheme: :link,+ color: :default,+ underline: false,+ font_weight: :bold,+ id: "meetings-add-attachments"+ )) do |button|+ button.with_leading_visual_icon(icon: "op-attachmentadd")+ t("js.label_add_attachments")+ end+ end+ end+ end+ end+%>diff --git a/modules/meeting/app/components/meetings/sidebar/attachments_component.rb b/modules/meeting/app/components/meetings/side_panel/attachments_component.rbsimilarity index 95%rename from modules/meeting/app/components/meetings/sidebar/attachments_component.rbrename to modules/meeting/app/components/meetings/side_panel/attachments_component.rbindex 01fd2d06215..f081350b8d4 100644--- a/modules/meeting/app/components/meetings/sidebar/attachments_component.rb+++ b/modules/meeting/app/components/meetings/side_panel/attachments_component.rb@@ -27,7 +27,7 @@#++module Meetings- class Sidebar::AttachmentsComponent < ApplicationComponent+ class SidePanel::AttachmentsComponent < ApplicationComponentinclude ApplicationHelperinclude OpTurbo::Streamableinclude OpPrimer::ComponentHelpersdiff --git a/modules/meeting/app/components/meetings/side_panel/details_component.html.erb b/modules/meeting/app/components/meetings/side_panel/details_component.html.erbnew file mode 100644index 00000000000..4cdb05c5f1a--- /dev/null+++ b/modules/meeting/app/components/meetings/side_panel/details_component.html.erb@@ -0,0 +1,111 @@+<%=+ component_wrapper do+ render(Primer::OpenProject::SidePanel::Section.new) do |section|+ section.with_title { t(:label_meeting_details) }++ if @meeting.editable?+ section.with_action_icon(+ icon: :gear,+ scheme: :invisible,+ tag: :a,+ href: details_dialog_meeting_path(@meeting),+ data: { controller: 'async-dialog' },+ 'aria-label': t("label_meeting_manage_participants"),+ test_selector: "edit-meeting-details-button",+ )+ end++ flex_layout do |details|+ details.with_row do+ render_meeting_attribute_row(:calendar) do+ render(Primer::Beta::Text.new) do+ format_date(@meeting.start_time)+ end+ end+ end++ details.with_row(mt: 2) do+ render_meeting_attribute_row(:clock) do+ flex_layout(align_items: :center) do |time|+ time.with_column do+ render(Primer::Beta::Text.new) do+ "#{format_time(@meeting.start_time, false)} - #{format_time(@meeting.end_time, false)}"+ end+ end++ time.with_column(ml: 2) do+ render(Primer::Beta::Text.new(color: :subtle, font_size: :small)) do+ (User.current.time_zone || Time.zone).to_s[/\((.*?)\)/m, 1]+ end+ end+ end+ end+ end++ details.with_row(mt: 2) do+ render_meeting_attribute_row(:stopwatch) do+ flex_layout do |duration|+ duration.with_column do+ render OpenProject::Common::DurationComponent.new(@meeting.duration, :hours, abbreviated: true)+ end++ if @meeting.duration_exceeded_by_agenda_items?+ duration.with_column(ml: 2) do+ render(Primer::Beta::Text.new(color: :danger, font_size: :small)) do+ "+ #{I18n.t('datetime.distance_in_words.x_minutes_abbreviated',+ count: @meeting.duration_exceeded_by_agenda_items_in_minutes.to_i)}"+ end+ end+ end+ end+ end+ end++ if @meeting.location.present?+ details.with_row(mt: 2) do+ if @meeting.location.include?("http")+ render_meeting_attribute_row(:link) do+ render(Primer::Beta::Link.new(href: @meeting.location, target: "_blank")) do+ render_truncated_location+ end+ end+ else+ render_meeting_attribute_row(:location) do+ render(Primer::Beta::Text.new) do+ render_truncated_location+ end+ end+ end+ end+ end++ details.with_row(mt: 2, classes: 'meeting-detail-participants', display: [nil, nil, :none]) do+ render_meeting_attribute_row(:people) do+ flex_layout do |people|+ people.with_column(mr: 2) do+ render(Primer::Beta::Text.new) do+ Meeting.human_attribute_name(+ :participant,+ count: @meeting.invited_or_attended_participants.count+ )+ end+ end++ people.with_column(mr: 2) do+ render(Primer::Beta::Button.new(+ scheme: :link,+ underline: false,+ tag: :a,+ href: participants_dialog_meeting_path(@meeting),+ data: { controller: 'async-dialog' }+ )) do+ t("label_meeting_show_all_participants")+ end+ end+ end+ end+ end+ end+ end+ end+%>diff --git a/modules/meeting/app/components/meetings/sidebar/details_component.rb b/modules/meeting/app/components/meetings/side_panel/details_component.rbsimilarity index 97%rename from modules/meeting/app/components/meetings/sidebar/details_component.rbrename to modules/meeting/app/components/meetings/side_panel/details_component.rbindex d4d930ccc79..8fa6f207400 100644--- a/modules/meeting/app/components/meetings/sidebar/details_component.rb+++ b/modules/meeting/app/components/meetings/side_panel/details_component.rb@@ -27,7 +27,7 @@#++module Meetings- class Sidebar::DetailsComponent < ApplicationComponent+ class SidePanel::DetailsComponent < ApplicationComponentinclude ApplicationHelperinclude OpTurbo::Streamableinclude OpPrimer::ComponentHelpersdiff --git a/modules/meeting/app/components/meetings/side_panel/details_dialog_component.html.erb b/modules/meeting/app/components/meetings/side_panel/details_dialog_component.html.erbnew file mode 100644index 00000000000..cc9da700ac5--- /dev/null+++ b/modules/meeting/app/components/meetings/side_panel/details_dialog_component.html.erb@@ -0,0 +1,10 @@+<%=+ render(Primer::Alpha::Dialog.new(+ id: "edit-meeting-details-dialog", title: t("label_meeting_details"),+ size: :medium_portrait+ )) do |dialog|+ dialog.with_header(variant: :large)+ dialog.with_show_button(icon: :pencil, 'aria-label': t("label_meeting_details_edit"), scheme: :invisible)+ render(Meetings::SidePanel::DetailsFormComponent.new(meeting: @meeting))+ end+%>diff --git a/modules/meeting/app/components/meetings/side_panel/details_dialog_component.rb b/modules/meeting/app/components/meetings/side_panel/details_dialog_component.rbnew file mode 100644index 00000000000..dee0eb8af49--- /dev/null+++ b/modules/meeting/app/components/meetings/side_panel/details_dialog_component.rb@@ -0,0 +1,46 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2024 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++module Meetings+ class SidePanel::DetailsDialogComponent < ApplicationComponent+ include ApplicationHelper+ include OpenProject::FormTagHelper+ include OpTurbo::Streamable+ include OpPrimer::ComponentHelpers++ def initialize(meeting:)+ super++ @meeting = meeting+ end++ def render?+ User.current.allowed_in_project?(:edit_meetings, @meeting.project)+ end+ end+enddiff --git a/modules/meeting/app/components/meetings/sidebar/details_form_component.html.erb b/modules/meeting/app/components/meetings/side_panel/details_form_component.html.erbsimilarity index 96%rename from modules/meeting/app/components/meetings/sidebar/details_form_component.html.erbrename to modules/meeting/app/components/meetings/side_panel/details_form_component.html.erbindex 4931236d2be..6d50c1888d0 100644--- a/modules/meeting/app/components/meetings/sidebar/details_form_component.html.erb+++ b/modules/meeting/app/components/meetings/side_panel/details_form_component.html.erb@@ -3,6 +3,7 @@primer_form_with(model: @meeting,method: :put,+ data: { turbo: true, turbo_stream: true },url: update_details_meeting_path(@meeting)) do |f|component_collection do |collection|diff --git a/modules/meeting/app/components/meetings/sidebar/details_form_component.rb b/modules/meeting/app/components/meetings/side_panel/details_form_component.rbsimilarity index 96%rename from modules/meeting/app/components/meetings/sidebar/details_form_component.rbrename to modules/meeting/app/components/meetings/side_panel/details_form_component.rbindex be027e791f7..fcff33d22eb 100644--- a/modules/meeting/app/components/meetings/sidebar/details_form_component.rb+++ b/modules/meeting/app/components/meetings/side_panel/details_form_component.rb@@ -27,7 +27,7 @@#++module Meetings- class Sidebar::DetailsFormComponent < ApplicationComponent+ class SidePanel::DetailsFormComponent < ApplicationComponentinclude ApplicationHelperinclude OpTurbo::Streamableinclude OpPrimer::ComponentHelpersdiff --git a/modules/meeting/app/components/meetings/side_panel/participants_component.html.erb b/modules/meeting/app/components/meetings/side_panel/participants_component.html.erbnew file mode 100644index 00000000000..aadcb0c079e--- /dev/null+++ b/modules/meeting/app/components/meetings/side_panel/participants_component.html.erb@@ -0,0 +1,56 @@+<%=+ component_wrapper do+ render(Primer::OpenProject::SidePanel::Section.new) do |section|+ section.with_title { Meeting.human_attribute_name(:participants) }+ section.with_description { I18n.t('meeting.attachments.text') }+ section.with_counter { @meeting.invited_or_attended_participants.count }++ if @meeting.editable?+ section.with_action_icon(+ icon: :gear,+ scheme: :invisible,+ tag: :a,+ href: participants_dialog_meeting_path(@meeting),+ data: { controller: 'async-dialog' },+ 'aria-label': t("label_meeting_manage_participants"),+ test_selector: "manage-participants-button",+ )+ end++ component_wrapper(data: wrapper_data_attributes) do+ flex_layout do |participants_container|+ participants_container.with_row do+ flex_layout(align_items: :center, justify_content: :space_between) do |heading|++ end+ end++ participants_container.with_row(mt: 2) do+ render(OpPrimer::ExpandableListComponent.new(cutoff_limit: 5)) do |list|+ elements.each do |item|+ list.with_element { render_participant(item) }+ end+ end+ end++ if @meeting.editable?+ participants_container.with_row(mt: 3) do+ render(Primer::Beta::Button.new(+ scheme: :link,+ color: :default,+ underline: false,+ font_weight: :bold,+ tag: :a,+ href: participants_dialog_meeting_path(@meeting),+ data: { controller: 'async-dialog' }+ )) do |button|+ button.with_leading_visual_icon(icon: "person-add")+ t("label_meeting_add_participants")+ end+ end+ end+ end+ end+ end+ end+%>diff --git a/modules/meeting/app/components/meetings/sidebar/participants_component.rb b/modules/meeting/app/components/meetings/side_panel/participants_component.rbsimilarity index 97%rename from modules/meeting/app/components/meetings/sidebar/participants_component.rbrename to modules/meeting/app/components/meetings/side_panel/participants_component.rbindex f9c4d6cefbf..a48beaa4cf6 100644--- a/modules/meeting/app/components/meetings/sidebar/participants_component.rb+++ b/modules/meeting/app/components/meetings/side_panel/participants_component.rb@@ -27,7 +27,7 @@#++module Meetings- class Sidebar::ParticipantsComponent < ApplicationComponent+ class SidePanel::ParticipantsComponent < ApplicationComponentinclude ApplicationHelperinclude OpTurbo::Streamableinclude OpPrimer::ComponentHelpersdiff --git a/modules/meeting/app/components/meetings/sidebar/participants_dialog.html.erb b/modules/meeting/app/components/meetings/side_panel/participants_dialog.html.erbsimilarity index 100%rename from modules/meeting/app/components/meetings/sidebar/participants_dialog.html.erbrename to modules/meeting/app/components/meetings/side_panel/participants_dialog.html.erbdiff --git a/modules/meeting/app/components/meetings/sidebar/participants_dialog.rb b/modules/meeting/app/components/meetings/side_panel/participants_dialog.rbsimilarity index 96%rename from modules/meeting/app/components/meetings/sidebar/participants_dialog.rbrename to modules/meeting/app/components/meetings/side_panel/participants_dialog.rbindex 1e1824b86ab..336d340aa36 100644--- a/modules/meeting/app/components/meetings/sidebar/participants_dialog.rb+++ b/modules/meeting/app/components/meetings/side_panel/participants_dialog.rb@@ -27,7 +27,7 @@#++module Meetings- class Sidebar::ParticipantsDialog < ApplicationComponent+ class SidePanel::ParticipantsDialog < ApplicationComponentinclude ApplicationHelperinclude OpenProject::FormTagHelperinclude OpTurbo::Streamablediff --git a/modules/meeting/app/components/meetings/side_panel/state_component.html.erb b/modules/meeting/app/components/meetings/side_panel/state_component.html.erbnew file mode 100644index 00000000000..4aa3cfd6b85--- /dev/null+++ b/modules/meeting/app/components/meetings/side_panel/state_component.html.erb@@ -0,0 +1,97 @@+<%=+ component_wrapper do+ render(Primer::OpenProject::SidePanel::Section.new) do |section|+ section.with_title { t(:label_meeting_state) }++ case @meeting.state+ when "open"+ section.with_description(display: [:none, nil, :block]) { t("text_meeting_open_description") }+ flex_layout(classes: 'op-meeting-sidebar-state') do |open_state|+ open_state.with_row do+ render(Primer::Beta::State.new(title: "state", scheme: :open)) do+ flex_layout do |open_state_label|+ open_state_label.with_column(mr: 1) do+ render(Primer::Beta::Octicon.new(icon: "issue-opened"))+ end++ open_state_label.with_column do+ render(Primer::Beta::Text.new) { t("label_meeting_state_open") }+ end+ end+ end+ end++ if edit_enabled?+ open_state.with_row(mt: [0, 3, 3, 3, 3]) do+ form_for(@meeting, method: "put", url: change_state_meeting_path(@meeting),+ data: { 'turbo-stream': true }) do |f|+ flex_layout do |open_state_actions|+ open_state_actions.with_row do+ f.hidden_field :state, value: "closed"+ end++ open_state_actions.with_row do+ render(Primer::Beta::Button.new(+ scheme: :link,+ color: :default,+ underline: false,+ font_weight: :bold,+ type: :submit+ )) do |button|+ button.with_leading_visual_icon(icon: :lock)+ t("label_meeting_close_action")+ end+ end+ end+ end+ end+ end+ end+ when "closed"+ section.with_description(display: [:none, nil, :block]) { t("text_meeting_closed_description") }++ flex_layout(classes: 'op-meeting-sidebar-state') do |closed_state|+ closed_state.with_row do+ render(Primer::Beta::State.new(title: "state", scheme: :default)) do+ flex_layout do |closed_state_label|+ closed_state_label.with_column(mr: 1) do+ render(Primer::Beta::Octicon.new(icon: "issue-closed"))+ end++ closed_state_label.with_column do+ render(Primer::Beta::Text.new) { t("label_meeting_state_closed") }+ end+ end+ end+ end++ if edit_enabled?+ closed_state.with_row(mt: [0, 3, 3, 3, 3]) do+ form_for(@meeting, method: "put", url: change_state_meeting_path(@meeting),+ data: { 'turbo-stream': true }) do |f|+ flex_layout do |closed_state_actions|+ closed_state_actions.with_row do+ f.hidden_field :state, value: "open"+ end++ closed_state_actions.with_row do+ render(Primer::Beta::Button.new(+ scheme: :link,+ color: :default,+ underline: false,+ font_weight: :bold,+ type: :submit+ )) do |button|+ button.with_leading_visual_icon(icon: :unlock)+ t("label_meeting_reopen_action")+ end+ end+ end+ end+ end+ end+ end+ end+ end+ end+%>diff --git a/modules/meeting/app/components/meetings/sidebar/state_component.rb b/modules/meeting/app/components/meetings/side_panel/state_component.rbsimilarity index 96%rename from modules/meeting/app/components/meetings/sidebar/state_component.rbrename to modules/meeting/app/components/meetings/side_panel/state_component.rbindex 0d0fb930aee..26cd929c0dc 100644--- a/modules/meeting/app/components/meetings/sidebar/state_component.rb+++ b/modules/meeting/app/components/meetings/side_panel/state_component.rb@@ -27,7 +27,7 @@#++module Meetings- class Sidebar::StateComponent < ApplicationComponent+ class SidePanel::StateComponent < ApplicationComponentinclude ApplicationHelperinclude OpTurbo::Streamableinclude OpPrimer::ComponentHelpersdiff --git a/modules/meeting/app/components/meetings/sidebar/state_component.sass b/modules/meeting/app/components/meetings/side_panel/state_component.sasssimilarity index 100%rename from modules/meeting/app/components/meetings/sidebar/state_component.sassrename to modules/meeting/app/components/meetings/side_panel/state_component.sassdiff --git a/modules/meeting/app/components/meetings/side_panel_component.html.erb b/modules/meeting/app/components/meetings/side_panel_component.html.erbnew file mode 100644index 00000000000..ecbe43faeda--- /dev/null+++ b/modules/meeting/app/components/meetings/side_panel_component.html.erb@@ -0,0 +1,15 @@+<%=+ component_wrapper do+ render(Primer::OpenProject::SidePanel.new) do |panel|+ panel.with_section(Meetings::SidePanel::DetailsComponent.new(meeting: @meeting))+ panel.with_section(Meetings::SidePanel::StateComponent.new(meeting: @meeting))++ desktop_grid_row_arguments = { display: [:none, nil, :"table_cell"] }+ panel.with_section(Meetings::SidePanel::ParticipantsComponent.new(meeting: @meeting),+ grid_row_arguments: desktop_grid_row_arguments)++ panel.with_section(Meetings::SidePanel::AttachmentsComponent.new(meeting: @meeting),+ grid_row_arguments: desktop_grid_row_arguments)+ end+ end+%>diff --git a/modules/meeting/app/components/meetings/sidebar_component.rb b/modules/meeting/app/components/meetings/side_panel_component.rbsimilarity index 96%rename from modules/meeting/app/components/meetings/sidebar_component.rbrename to modules/meeting/app/components/meetings/side_panel_component.rbindex 891657afc99..97b078af57d 100644--- a/modules/meeting/app/components/meetings/sidebar_component.rb+++ b/modules/meeting/app/components/meetings/side_panel_component.rb@@ -27,7 +27,7 @@#++module Meetings- class SidebarComponent < ApplicationComponent+ class SidePanelComponent < ApplicationComponentinclude ApplicationHelperinclude OpTurbo::Streamableinclude OpPrimer::ComponentHelpersdiff --git a/modules/meeting/app/components/meetings/sidebar/attachments_component.html.erb b/modules/meeting/app/components/meetings/sidebar/attachments_component.html.erbdeleted file mode 100644index e133e34208a..00000000000--- a/modules/meeting/app/components/meetings/sidebar/attachments_component.html.erb+++ /dev/null@@ -1,34 +0,0 @@-<%=- flex_layout do |attachments_container|- attachments_container.with_row do- render(Primer::Beta::Heading.new(tag: :h4)) { I18n.t(:label_attachment_plural) }- end-- attachments_container.with_row(mt: 2) do- render(Primer::Beta::Text.new(color: :subtle)) { I18n.t('meeting.attachments.text') }- end-- attachments_container.with_row(mt: 2) do- resource = ::API::V3::Meetings::MeetingRepresenter.new(@meeting, current_user: User.current, embed_links: false)- helpers.list_attachments(resource,- inputs: {- allowUploading: true,- showTimestamp: false,- externalUploadButton: "#meetings-add-attachments"- })- end-- attachments_container.with_row(mt: 1) do- render(Primer::Beta::Button.new(- scheme: :link,- color: :default,- underline: false,- font_weight: :bold,- id: "meetings-add-attachments"- )) do |button|- button.with_leading_visual_icon(icon: "op-attachmentadd")- t("js.label_add_attachments")- end- end- end-%>diff --git a/modules/meeting/app/components/meetings/sidebar/details_component.html.erb b/modules/meeting/app/components/meetings/sidebar/details_component.html.erbdeleted file mode 100644index b1b3bf4167e..00000000000--- a/modules/meeting/app/components/meetings/sidebar/details_component.html.erb+++ /dev/null@@ -1,120 +0,0 @@-<%=- component_wrapper do- flex_layout(mt: 3) do |details_container|- details_container.with_row do- flex_layout(align_items: :center, justify_content: :space_between) do |heading|- heading.with_column(flex: 1) do- render(Primer::Beta::Heading.new(tag: :h4)) { t("label_meeting_details") }- end-- if @meeting.editable?- heading.with_column do- render(Primer::Alpha::Dialog.new(- id: "edit-meeting-details-dialog", title: t("label_meeting_details"),- size: :medium_portrait- )) do |dialog|- dialog.with_header(variant: :large)- dialog.with_show_button(icon: :pencil, 'aria-label': t("label_meeting_details_edit"), scheme: :invisible)- render(Meetings::Sidebar::DetailsFormComponent.new(meeting: @meeting))- end- end- end- end- end-- details_container.with_row(mt: 2) do- flex_layout do |details|- details.with_row do- render_meeting_attribute_row(:calendar) do- render(Primer::Beta::Text.new) do- format_date(@meeting.start_time)- end- end- end-- details.with_row(mt: 2) do- render_meeting_attribute_row(:clock) do- flex_layout(align_items: :center) do |time|- time.with_column do- render(Primer::Beta::Text.new) do- "#{format_time(@meeting.start_time, false)} - #{format_time(@meeting.end_time, false)}"- end- end-- time.with_column(ml: 2) do- render(Primer::Beta::Text.new(color: :subtle, font_size: :small)) do- (User.current.time_zone || Time.zone).to_s[/\((.*?)\)/m, 1]- end- end- end- end- end-- details.with_row(mt: 2) do- render_meeting_attribute_row(:stopwatch) do- flex_layout do |duration|- duration.with_column do- render OpenProject::Common::DurationComponent.new(@meeting.duration, :hours, abbreviated: true)- end-- if @meeting.duration_exceeded_by_agenda_items?- duration.with_column(ml: 2) do- render(Primer::Beta::Text.new(color: :danger, font_size: :small)) do- "+ #{I18n.t('datetime.distance_in_words.x_minutes_abbreviated',- count: @meeting.duration_exceeded_by_agenda_items_in_minutes.to_i)}"- end- end- end- end- end- end-- if @meeting.location.present?- details.with_row(mt: 2) do- if @meeting.location.include?("http")- render_meeting_attribute_row(:link) do- render(Primer::Beta::Link.new(href: @meeting.location, target: "_blank")) do- render_truncated_location- end- end- else- render_meeting_attribute_row(:location) do- render(Primer::Beta::Text.new) do- render_truncated_location- end- end- end- end- end-- details.with_row(mt: 2, classes: 'meeting-detail-participants', display: [nil, nil, :none]) do- render_meeting_attribute_row(:people) do- flex_layout do |people|- people.with_column(mr: 2) do- render(Primer::Beta::Text.new) do- Meeting.human_attribute_name(- :participant,- count: @meeting.invited_or_attended_participants.count- )- end- end-- people.with_column(mr: 2) do- render(Primer::Beta::Button.new(- scheme: :link,- underline: false,- tag: :a,- href: participants_dialog_meeting_path(@meeting),- data: { controller: 'async-dialog' }- )) do- t("label_meeting_show_all_participants")- end- end- end- end- end- end- end- end- end-%>diff --git a/modules/meeting/app/components/meetings/sidebar/participants_component.html.erb b/modules/meeting/app/components/meetings/sidebar/participants_component.html.erbdeleted file mode 100644index 1d947e4ce4e..00000000000--- a/modules/meeting/app/components/meetings/sidebar/participants_component.html.erb+++ /dev/null@@ -1,60 +0,0 @@-<%=- component_wrapper(data: wrapper_data_attributes) do- flex_layout do |participants_container|- participants_container.with_row do- flex_layout(align_items: :center, justify_content: :space_between) do |heading|- heading.with_column(flex: 1) do- flex_layout(align_items: :center) do |title|- title.with_column(mr: 2) do- render(Primer::Beta::Heading.new(tag: :h4)) { Meeting.human_attribute_name(:participants) }- end-- title.with_column do- render(Primer::Beta::Counter.new(count: @meeting.invited_or_attended_participants.count, scheme: :primary))- end- end- end-- if @meeting.editable?- heading.with_column do- render(Primer::Beta::IconButton.new(- icon: :gear,- scheme: :invisible,- tag: :a,- href: participants_dialog_meeting_path(@meeting),- data: { controller: 'async-dialog' },- 'aria-label': t("label_meeting_manage_participants"),- test_selector: "manage-participants-button",- ))- end- end- end- end-- participants_container.with_row(mt: 2) do- render(OpPrimer::ExpandableListComponent.new(cutoff_limit: 5)) do |list|- elements.each do |item|- list.with_element { render_participant(item) }- end- end- end-- if @meeting.editable?- participants_container.with_row(mt: 3) do- render(Primer::Beta::Button.new(- scheme: :link,- color: :default,- underline: false,- font_weight: :bold,- tag: :a,- href: participants_dialog_meeting_path(@meeting),- data: { controller: 'async-dialog' }- )) do |button|- button.with_leading_visual_icon(icon: "person-add")- t("label_meeting_add_participants")- end- end- end- end- end-%>diff --git a/modules/meeting/app/components/meetings/sidebar/state_component.html.erb b/modules/meeting/app/components/meetings/sidebar/state_component.html.erbdeleted file mode 100644index 8ddec74897c..00000000000--- a/modules/meeting/app/components/meetings/sidebar/state_component.html.erb+++ /dev/null@@ -1,102 +0,0 @@-<%=- component_wrapper do- case @meeting.state- when "open"- flex_layout(classes: 'op-meeting-sidebar-state') do |open_state|- open_state.with_row do- render(Primer::Beta::State.new(title: "state", scheme: :open)) do- flex_layout do |open_state_label|- open_state_label.with_column(mr: 1) do- render(Primer::Beta::Octicon.new(icon: "issue-opened"))- end-- open_state_label.with_column do- render(Primer::Beta::Text.new) { t("label_meeting_state_open") }- end- end- end- end-- open_state.with_row(mt: 3, display: [:none, nil, :block]) do- render(Primer::Beta::Text.new(color: :subtle)) do- t("text_meeting_open_description")- end- end-- if edit_enabled?- open_state.with_row(mt: [0, 3, 3, 3, 3]) do- form_for(@meeting, method: "put", url: change_state_meeting_path(@meeting),- data: { 'turbo-stream': true }) do |f|- flex_layout do |open_state_actions|- open_state_actions.with_row do- f.hidden_field :state, value: "closed"- end-- open_state_actions.with_row do- render(Primer::Beta::Button.new(- scheme: :link,- color: :default,- underline: false,- font_weight: :bold,- type: :submit- )) do |button|- button.with_leading_visual_icon(icon: :lock)- t("label_meeting_close_action")- end- end- end- end- end- end- end- when "closed"- flex_layout(classes: 'op-meeting-sidebar-state') do |closed_state|- closed_state.with_row do- render(Primer::Beta::State.new(title: "state", scheme: :default)) do- flex_layout do |closed_state_label|- closed_state_label.with_column(mr: 1) do- render(Primer::Beta::Octicon.new(icon: "issue-closed"))- end-- closed_state_label.with_column do- render(Primer::Beta::Text.new) { t("label_meeting_state_closed") }- end- end- end- end-- closed_state.with_row(mt: 3) do- render(Primer::Beta::Text.new(color: :subtle, display: [:none, nil, :block])) do- t("text_meeting_closed_description")- end- end-- if edit_enabled?- closed_state.with_row(mt: [0, 3, 3, 3, 3]) do- form_for(@meeting, method: "put", url: change_state_meeting_path(@meeting),- data: { 'turbo-stream': true }) do |f|- flex_layout do |closed_state_actions|- closed_state_actions.with_row do- f.hidden_field :state, value: "open"- end-- closed_state_actions.with_row do- render(Primer::Beta::Button.new(- scheme: :link,- color: :default,- underline: false,- font_weight: :bold,- type: :submit- )) do |button|- button.with_leading_visual_icon(icon: :unlock)- t("label_meeting_reopen_action")- end- end- end- end- end- end- end- end- end-%>diff --git a/modules/meeting/app/components/meetings/sidebar_component.html.erb b/modules/meeting/app/components/meetings/sidebar_component.html.erbdeleted file mode 100644index 7ba7a1887c4..00000000000--- a/modules/meeting/app/components/meetings/sidebar_component.html.erb+++ /dev/null@@ -1,10 +0,0 @@-<%=- component_wrapper do- render(Primer::OpenProject::BorderGrid.new(spacious: true)) do |border_grid|- border_grid.with_row { render(Meetings::Sidebar::DetailsComponent.new(meeting: @meeting)) }- border_grid.with_row { render(Meetings::Sidebar::StateComponent.new(meeting: @meeting)) }- border_grid.with_row(display: [:none, nil, :"table_cell"]) { render(Meetings::Sidebar::ParticipantsComponent.new(meeting: @meeting)) }- border_grid.with_row(display: [:none, nil, :"table_cell"]) { render(Meetings::Sidebar::AttachmentsComponent.new(meeting: @meeting)) }- end- end-%>diff --git a/modules/meeting/app/controllers/concerns/meetings/agenda_component_streams.rb b/modules/meeting/app/controllers/concerns/meetings/agenda_component_streams.rbindex 64019aa7b09..1236133ee6f 100644--- a/modules/meeting/app/controllers/concerns/meetings/agenda_component_streams.rb+++ b/modules/meeting/app/controllers/concerns/meetings/agenda_component_streams.rb@@ -43,7 +43,7 @@ module Meetingsdef update_sidebar_component_via_turbo_stream(meeting: @meeting)update_via_turbo_stream(- component: Meetings::SidebarComponent.new(+ component: Meetings::SidePanelComponent.new(meeting:))@@ -51,7 +51,7 @@ module Meetingsdef update_sidebar_details_component_via_turbo_stream(meeting: @meeting)update_via_turbo_stream(- component: Meetings::Sidebar::DetailsComponent.new(+ component: Meetings::SidePanel::DetailsComponent.new(meeting:))@@ -59,7 +59,7 @@ module Meetingsdef update_sidebar_state_component_via_turbo_stream(meeting: @meeting)update_via_turbo_stream(- component: Meetings::Sidebar::StateComponent.new(+ component: Meetings::SidePanel::StateComponent.new(meeting:))@@ -67,7 +67,7 @@ module Meetingsdef update_sidebar_details_form_component_via_turbo_stream(meeting: @meeting, status: :bad_request)update_via_turbo_stream(- component: Meetings::Sidebar::DetailsFormComponent.new(+ component: Meetings::SidePanel::DetailsFormComponent.new(meeting:),status:@@ -76,7 +76,7 @@ module Meetingsdef update_sidebar_participants_component_via_turbo_stream(meeting: @meeting)update_via_turbo_stream(- component: Meetings::Sidebar::ParticipantsComponent.new(+ component: Meetings::SidePanel::ParticipantsComponent.new(meeting:))@@ -84,7 +84,7 @@ module Meetingsdef update_sidebar_participants_form_component_via_turbo_stream(meeting: @meeting)update_via_turbo_stream(- component: Meetings::Sidebar::ParticipantsFormComponent.new(+ component: Meetings::SidePanel::ParticipantsFormComponent.new(meeting:),status: :bad_request # TODO: why bad_request?diff --git a/modules/meeting/app/controllers/meetings_controller.rb b/modules/meeting/app/controllers/meetings_controller.rbindex 7e47bd8471a..9b5e4f417bd 100644--- a/modules/meeting/app/controllers/meetings_controller.rb+++ b/modules/meeting/app/controllers/meetings_controller.rb@@ -162,6 +162,8 @@ class MeetingsController < ApplicationControllerendend+ def details_dialog; end+def participants_dialog; enddef update_participantsdiff --git a/modules/meeting/app/views/meetings/details_dialog.turbo_stream.erb b/modules/meeting/app/views/meetings/details_dialog.turbo_stream.erbnew file mode 100644index 00000000000..10263aff66b--- /dev/null+++ b/modules/meeting/app/views/meetings/details_dialog.turbo_stream.erb@@ -0,0 +1,5 @@+<%=+ turbo_stream.dialog do+ render(Meetings::SidePanel::DetailsDialogComponent.new(meeting: @meeting))+ end+%>diff --git a/modules/meeting/app/views/meetings/participants_dialog.turbo_stream.erb b/modules/meeting/app/views/meetings/participants_dialog.turbo_stream.erbindex d0a526ec92d..18f531fde94 100644--- a/modules/meeting/app/views/meetings/participants_dialog.turbo_stream.erb+++ b/modules/meeting/app/views/meetings/participants_dialog.turbo_stream.erb@@ -1,5 +1,5 @@<%=turbo_stream.dialog do- render(Meetings::Sidebar::ParticipantsDialog.new(meeting: @meeting))+ render(Meetings::SidePanel::ParticipantsDialog.new(meeting: @meeting))end%>diff --git a/modules/meeting/config/routes.rb b/modules/meeting/config/routes.rbindex 9a23450880a..6aa052cc911 100644--- a/modules/meeting/config/routes.rb+++ b/modules/meeting/config/routes.rb@@ -60,6 +60,7 @@ Rails.application.routes.draw doget :cancel_editget :download_icsput :update_title+ get :details_dialogput :update_detailsget :participants_dialogput :update_participantsdiff --git a/modules/meeting/lib/open_project/meeting/engine.rb b/modules/meeting/lib/open_project/meeting/engine.rbindex 0669e093360..e6dbaedae0c 100644--- a/modules/meeting/lib/open_project/meeting/engine.rb+++ b/modules/meeting/lib/open_project/meeting/engine.rb@@ -54,7 +54,7 @@ module OpenProject::Meetingcontract_actions: { meetings: %i[create] }permission :edit_meetings,{- meetings: %i[edit cancel_edit update update_title update_details update_participants],+ meetings: %i[edit cancel_edit update update_title details_dialog update_details update_participants],work_package_meetings_tab: %i[add_work_package_to_meeting_dialog add_work_package_to_meeting]},permissible_on: :project,diff --git a/modules/meeting/spec/support/pages/structured_meeting/show.rb b/modules/meeting/spec/support/pages/structured_meeting/show.rbindex d4efe3e7e34..223a8f9e149 100644--- a/modules/meeting/spec/support/pages/structured_meeting/show.rb+++ b/modules/meeting/spec/support/pages/structured_meeting/show.rb@@ -225,7 +225,7 @@ module Pages::StructuredMeetingenddef meeting_details_container- find_by_id("meetings-sidebar-details-component")+ find_by_id("meetings-side-panel-details-component")enddef in_latest_section_form(&)