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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
show correct breadcrumb in form header component of projects custom fields
Behrokh Satarnejad82364e15471c
diff --git a/app/components/settings/project_custom_fields/new_form_header_component.html.erb b/app/components/settings/project_custom_fields/new_form_header_component.html.erbindex 1913a74db2a..a6051351a86 100644--- a/app/components/settings/project_custom_fields/new_form_header_component.html.erb+++ b/app/components/settings/project_custom_fields/new_form_header_component.html.erb@@ -31,9 +31,6 @@ See COPYRIGHT and LICENSE files for more details.render(Primer::OpenProject::PageHeader.new) do |header|header.with_title(variant: :medium) { t('settings.project_attributes.new.heading') }header.with_description { t('settings.project_attributes.new.description') }- header.with_parent_link(href: admin_settings_project_custom_fields_path, 'aria-label': I18n.t("button_back")) do- t('settings.project_attributes.heading')- end- header.with_back_button(href: admin_settings_project_custom_fields_path, 'aria-label': t('button_back'))+ header.with_breadcrumbs(breadcrumb_items)end%>diff --git a/app/components/settings/project_custom_fields/new_form_header_component.rb b/app/components/settings/project_custom_fields/new_form_header_component.rbindex 8c9f07076f8..29bb2748b72 100644--- a/app/components/settings/project_custom_fields/new_form_header_component.rb+++ b/app/components/settings/project_custom_fields/new_form_header_component.rb@@ -29,6 +29,11 @@module Settingsmodule ProjectCustomFieldsclass NewFormHeaderComponent < ApplicationComponent+ def breadcrumb_items+ [{ href: admin_index_path, text: t("label_administration") },+ { href: admin_settings_project_custom_fields_path, text: t("settings.project_attributes.heading") },+ t("settings.project_attributes.new.heading")]+ endendendenddiff --git a/app/controllers/admin/settings/project_custom_fields_controller.rb b/app/controllers/admin/settings/project_custom_fields_controller.rbindex f25cca6013d..4c58e07632a 100644--- a/app/controllers/admin/settings/project_custom_fields_controller.rb+++ b/app/controllers/admin/settings/project_custom_fields_controller.rb@@ -39,16 +39,8 @@ module Admin::Settingsbefore_action :prepare_custom_option_position, only: %i(update create)before_action :find_custom_option, only: :delete_option- def default_breadcrumb- if action_name == "index"- t("label_project_attribute_plural")- else- ActionController::Base.helpers.link_to(t("label_project_attribute_plural"), admin_settings_project_custom_fields_path)- end- end-def show_local_breadcrumb- true+ falseenddef index