Skip to content

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

Use the stream action in a new MeetingsController#check_for_updates

Oliver Günther5d7adc2e40ef
diff --git a/modules/meeting/app/controllers/meetings_controller.rb b/modules/meeting/app/controllers/meetings_controller.rb
index 7e47bd8471a..9d2097a7f29 100644
--- a/modules/meeting/app/controllers/meetings_controller.rb
+++ b/modules/meeting/app/controllers/meetings_controller.rb
@@ -49,6 +49,7 @@ class MeetingsController < ApplicationController
include SortHelper
include OpTurbo::ComponentStream
+ include OpTurbo::FlashStreamHelper
include ApplicationComponentStreams
include Meetings::AgendaComponentStreams
include MetaTagsHelper
@@ -74,6 +75,10 @@ class MeetingsController < ApplicationController
end
end
+ def check_for_updates
+ respond_with_flash(Meetings::UpdateFlashComponent.new(meeting: @meeting))
+ end
+
def create # rubocop:disable Metrics/AbcSize
call =
if @copy_from
diff --git a/modules/meeting/config/routes.rb b/modules/meeting/config/routes.rb
index 9a23450880a..1a7e619a597 100644
--- a/modules/meeting/config/routes.rb
+++ b/modules/meeting/config/routes.rb
@@ -57,6 +57,7 @@ Rails.application.routes.draw do
resources :meetings do
member do
+ get :check_for_updates
get :cancel_edit
get :download_ics
put :update_title
diff --git a/modules/meeting/lib/open_project/meeting/engine.rb b/modules/meeting/lib/open_project/meeting/engine.rb
index 0669e093360..9853a4e5a44 100644
--- a/modules/meeting/lib/open_project/meeting/engine.rb
+++ b/modules/meeting/lib/open_project/meeting/engine.rb
@@ -40,7 +40,7 @@ module OpenProject::Meeting
bundled: true do
project_module :meetings do
permission :view_meetings,
- { meetings: %i[index show download_ics participants_dialog history],
+ { meetings: %i[index show check_for_updates download_ics participants_dialog history],
meeting_agendas: %i[history show diff],
meeting_minutes: %i[history show diff],
"meetings/menus": %i[show],