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 a grouped action menu on project custom fields

ulferts17df4519baef
diff --git a/app/components/settings/project_custom_fields/header_component.html.erb b/app/components/settings/project_custom_fields/header_component.html.erb
index 0e247a94b75..70056a4be03 100644
--- a/app/components/settings/project_custom_fields/header_component.html.erb
+++ b/app/components/settings/project_custom_fields/header_component.html.erb
@@ -29,17 +29,20 @@
)
menu.with_divider
+ menu.with_group do |group|
+ group.with_heading(title: t("settings.project_attributes.label_new_attribute"))
- OpenProject::CustomFieldFormat.all_for_class_name("Project")
- .sort_by(&:name)
- .map do |format|
- menu.with_item(
- label: "#{t('settings.project_attributes.label_new_attribute')}: #{helpers.label_for_custom_field_format(format.name)}",
- tag: :a,
- href: new_admin_settings_project_custom_field_path(field_format: format.name),
- content_arguments: { data: { turbo: "false",
- test_selector: "new-project-custom-field-button" } }
- )
+ OpenProject::CustomFieldFormat.all_for_class_name("Project")
+ .sort_by(&:name)
+ .map do |format|
+ group.with_item(
+ label: helpers.label_for_custom_field_format(format.name),
+ tag: :a,
+ href: new_admin_settings_project_custom_field_path(field_format: format.name),
+ content_arguments: { data: { turbo: "false",
+ test_selector: "new-project-custom-field-button" } }
+ )
+ end
end
end
end