mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
52bc1080bd
- fix migration to rename existing data in custom fields table - update project custom fields header to show all custom fields with enterprise addon - show upsale page for hierarchies and weighted item lists
57 lines
2.2 KiB
Plaintext
57 lines
2.2 KiB
Plaintext
<%= component_wrapper do %>
|
|
<%=
|
|
render Primer::OpenProject::PageHeader.new do |header|
|
|
header.with_title(variant: :default) { t("settings.project_attributes.heading") }
|
|
header.with_description { t("settings.project_attributes.heading_description") }
|
|
header.with_breadcrumbs(breadcrumbs_items)
|
|
end
|
|
%>
|
|
|
|
<%=
|
|
render Primer::OpenProject::SubHeader.new do |subheader|
|
|
subheader.with_action_menu(
|
|
leading_icon: :plus,
|
|
trailing_icon: :"triangle-down",
|
|
label: I18n.t(:button_add),
|
|
anchor_align: :end,
|
|
button_arguments: {
|
|
scheme: :primary,
|
|
aria: { label: I18n.t(:button_add) },
|
|
test_selector: "project-attributes-add-menu-button"
|
|
}
|
|
) do |menu|
|
|
menu.with_item(
|
|
label: t("settings.project_attributes.label_new_section"),
|
|
id: "dialog-show-project-custom-field-section-dialog",
|
|
tag: :a,
|
|
href: new_link_admin_settings_project_custom_field_sections_path,
|
|
content_arguments: { data: { controller: "async-dialog", test_selector: "add-project-custom-field-section" } }
|
|
)
|
|
|
|
if allow_custom_field_creation?
|
|
menu.with_sub_menu_item(
|
|
label: t("settings.project_attributes.label_new_attribute"),
|
|
content_arguments: { data: { test_selector: "add-project-custom-field-attribute" } }
|
|
) do |sub_menu|
|
|
OpenProject::CustomFieldFormat.enabled_for_class_name("Project")
|
|
.sort_by(&:name)
|
|
.map do |format|
|
|
sub_menu.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" } }
|
|
) do |item|
|
|
unless format.enterprise_feature_allowed?
|
|
item.with_trailing_visual_icon(icon: :"op-enterprise-addons", classes: "upsell-colored")
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
%>
|
|
<% end %>
|