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

Also move copy to project

Oliver Günthera457280d2b2d
diff --git a/modules/meeting/app/components/meetings/header_component.html.erb b/modules/meeting/app/components/meetings/header_component.html.erb
index d18fdc6d95e..82cc17ba597 100644
--- a/modules/meeting/app/components/meetings/header_component.html.erb
+++ b/modules/meeting/app/components/meetings/header_component.html.erb
@@ -62,7 +62,7 @@
unless @meeting.template?
menu.with_item(label: copy_label,
- href: copy_meeting_path(@meeting),
+ href: copy_project_meeting_path(@project, @meeting),
content_arguments: {
data: { turbo_stream: true }
}) do |item|
diff --git a/modules/meeting/app/components/meetings/row_component.rb b/modules/meeting/app/components/meetings/row_component.rb
index 5e243307fa8..14a0866355a 100644
--- a/modules/meeting/app/components/meetings/row_component.rb
+++ b/modules/meeting/app/components/meetings/row_component.rb
@@ -119,7 +119,7 @@ module Meetings
return unless copy_allowed?
menu.with_item(label: I18n.t(:label_meeting_copy),
- href: copy_meeting_path(model),
+ href: copy_project_meeting_path(project, model),
content_arguments: {
data: {
turbo: model.is_a?(StructuredMeeting),
diff --git a/modules/meeting/app/views/meetings/show.html.erb b/modules/meeting/app/views/meetings/show.html.erb
index 1538d7d0ea0..7c76d8122c7 100644
--- a/modules/meeting/app/views/meetings/show.html.erb
+++ b/modules/meeting/app/views/meetings/show.html.erb
@@ -74,7 +74,7 @@ See COPYRIGHT and LICENSE files for more details.
<% if authorize_for(:meetings, :copy) %>
<li>
<%= link_to(t(:button_copy),
- copy_meeting_path(@meeting),
+ copy_project_meeting_path(@project, @meeting),
class: "icon-context icon-copy") %>
</li>
<% end %>
diff --git a/modules/meeting/config/routes.rb b/modules/meeting/config/routes.rb
index cb35b36925c..6c19e01ba94 100644
--- a/modules/meeting/config/routes.rb
+++ b/modules/meeting/config/routes.rb
@@ -35,6 +35,7 @@ Rails.application.routes.draw do
end
member do
+ get :copy
get :check_for_updates
get :cancel_edit
get :download_ics
@@ -149,7 +150,6 @@ Rails.application.routes.draw do
end
member do
- get :copy
match "/:tab" => "meetings#show", :constraints => { tab: /(agenda|minutes)/ },
:via => :get,
:as => "tab"
diff --git a/modules/meeting/spec/features/structured_meetings/structured_meeting_delete_spec.rb b/modules/meeting/spec/features/structured_meetings/structured_meeting_delete_spec.rb
index ffb4818a62f..af4d4f42654 100644
--- a/modules/meeting/spec/features/structured_meetings/structured_meeting_delete_spec.rb
+++ b/modules/meeting/spec/features/structured_meetings/structured_meeting_delete_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH