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
Ensure collapsed state is kept for 'Move to section'
Mir Bhatiac07b06015b06
diff --git a/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.rb b/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.rbindex 856d4b6b48c..293935ed830 100644--- a/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.rb+++ b/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.rb@@ -249,14 +249,15 @@ module MeetingAgendaItemsreturn unless many_sections?menu.with_item(label: I18n.t(:label_agenda_item_move_to_section),- href: move_to_section_dialog_meeting_agenda_item_path(- @meeting_agenda_item.meeting,- @meeting_agenda_item,- current_occurrence: @current_occurrence- ),- form_arguments: {- method: :put, data: { "turbo-stream": true }- }) do |item|+ tag: :button,+ content_arguments: { data: {+ action: "click->meetings--add-params#intercept",+ href: move_to_section_dialog_meeting_agenda_item_path(+ @meeting_agenda_item.meeting,+ @meeting_agenda_item,+ current_occurrence: @current_occurrence+ )+ } }) do |item|item.with_leading_visual_icon(icon: "op-move")endenddiff --git a/modules/meeting/app/components/meeting_agenda_items/move_to_section_dialog_component.html.erb b/modules/meeting/app/components/meeting_agenda_items/move_to_section_dialog_component.html.erbindex 310ad68cc9c..a5aae3fa0b8 100644--- a/modules/meeting/app/components/meeting_agenda_items/move_to_section_dialog_component.html.erb+++ b/modules/meeting/app/components/meeting_agenda_items/move_to_section_dialog_component.html.erb@@ -39,7 +39,8 @@ See COPYRIGHT and LICENSE files for more details.render(MeetingAgendaItems::MoveToSectionFormComponent.new(meeting: @meeting,- agenda_item: @agenda_item+ agenda_item: @agenda_item,+ collapsed: @collapsed))enddiff --git a/modules/meeting/app/components/meeting_agenda_items/move_to_section_dialog_component.rb b/modules/meeting/app/components/meeting_agenda_items/move_to_section_dialog_component.rbindex 6968029610f..dff786800cd 100644--- a/modules/meeting/app/components/meeting_agenda_items/move_to_section_dialog_component.rb+++ b/modules/meeting/app/components/meeting_agenda_items/move_to_section_dialog_component.rb@@ -34,11 +34,12 @@ module MeetingAgendaItemsinclude OpTurbo::Streamableinclude OpPrimer::ComponentHelpers- def initialize(meeting:, agenda_item:)+ def initialize(meeting:, agenda_item:, collapsed:)super@meeting = meeting@agenda_item = agenda_item+ @collapsed = collapsedendendenddiff --git a/modules/meeting/app/components/meeting_agenda_items/move_to_section_form_component.html.erb b/modules/meeting/app/components/meeting_agenda_items/move_to_section_form_component.html.erbindex 076c5db927b..dffac28f583 100644--- a/modules/meeting/app/components/meeting_agenda_items/move_to_section_form_component.html.erb+++ b/modules/meeting/app/components/meeting_agenda_items/move_to_section_form_component.html.erb@@ -35,7 +35,8 @@ See COPYRIGHT and LICENSE files for more details.method: :post,url: move_to_section_meeting_agenda_item_path(@agenda_item.meeting,- @agenda_item+ @agenda_item,+ collapsed: @collapsed)) do |f|flex_layout(mb: 3) do |flex|diff --git a/modules/meeting/app/components/meeting_agenda_items/move_to_section_form_component.rb b/modules/meeting/app/components/meeting_agenda_items/move_to_section_form_component.rbindex d1554662784..c4e4da0cbd4 100644--- a/modules/meeting/app/components/meeting_agenda_items/move_to_section_form_component.rb+++ b/modules/meeting/app/components/meeting_agenda_items/move_to_section_form_component.rb@@ -34,11 +34,12 @@ module MeetingAgendaItemsinclude OpTurbo::Streamableinclude OpPrimer::ComponentHelpers- def initialize(meeting:, agenda_item:)+ def initialize(meeting:, agenda_item:, collapsed:)super@meeting = meeting@agenda_item = agenda_item+ @collapsed = collapsedendendenddiff --git a/modules/meeting/app/controllers/meeting_agenda_items_controller.rb b/modules/meeting/app/controllers/meeting_agenda_items_controller.rbindex c8a692fda82..05fd03b127d 100644--- a/modules/meeting/app/controllers/meeting_agenda_items_controller.rb+++ b/modules/meeting/app/controllers/meeting_agenda_items_controller.rb@@ -248,7 +248,8 @@ class MeetingAgendaItemsController < ApplicationControllerrespond_with_dialog MeetingAgendaItems::MoveToSectionDialogComponent.new(agenda_item: @meeting_agenda_item,- meeting:+ meeting:,+ collapsed: params[:collapsed])end