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

WIP[Op#54456]: Added placholder action button for attribute projects list

Andreas Pfohl1e6dbbe82a71
diff --git a/app/components/settings/project_custom_fields/project_custom_field_mapping/row_component.rb b/app/components/settings/project_custom_fields/project_custom_field_mapping/row_component.rb
index 2b620be8473..fb90b8b7ab5 100644
--- a/app/components/settings/project_custom_fields/project_custom_field_mapping/row_component.rb
+++ b/app/components/settings/project_custom_fields/project_custom_field_mapping/row_component.rb
@@ -30,6 +30,22 @@ module Settings
module ProjectCustomFields
module ProjectCustomFieldMapping
class RowComponent < Projects::RowComponent
+ private
+
+ def more_menu_items
+ @more_menu_items ||= [more_menu_detach_project].compact
+ end
+
+ def more_menu_detach_project
+ if User.current.admin
+ {
+ scheme: :danger,
+ icon: :trash,
+ label: I18n.t(:button_delete),
+ href: confirm_destroy_project_path(project)
+ }
+ end
+ end
end
end
end