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

Fix some breadcrumbs for better mobile behaviour

Henriette Darge10abcbcb3ab1
diff --git a/app/components/members/index_page_header_component.rb b/app/components/members/index_page_header_component.rb
index d13a3ef4498..c53909b330a 100644
--- a/app/components/members/index_page_header_component.rb
+++ b/app/components/members/index_page_header_component.rb
@@ -81,6 +81,7 @@ class Members::IndexPageHeaderComponent < ApplicationComponent
section.children.find do |menu_query|
if !!menu_query.selected
query_name = menu_query.title
+ query_href = menu_query.href
menu_header = section.header
end
end
diff --git a/modules/auth_saml/app/views/saml/providers/index.html.erb b/modules/auth_saml/app/views/saml/providers/index.html.erb
index dc3e7ef4c82..d886e517c8e 100644
--- a/modules/auth_saml/app/views/saml/providers/index.html.erb
+++ b/modules/auth_saml/app/views/saml/providers/index.html.erb
@@ -5,6 +5,7 @@
header.with_title { t("saml.providers.plural") }
header.with_breadcrumbs(
[{ href: admin_index_path, text: t("label_administration") },
+ { href: admin_settings_authentication_path, text: t(:label_authentication) },
t("saml.providers.plural")]
)
end %>
@@ -23,5 +24,5 @@
end %>
<% end %>
-<%= render EnterpriseEdition::BannerComponent.new(:sso_auth_providers, i18n_scope: "saml.providers.upsell")%>
+<%= render EnterpriseEdition::BannerComponent.new(:sso_auth_providers, i18n_scope: "saml.providers.upsell") %>
<%= render ::Saml::Providers::TableComponent.new(rows: @providers) %>
diff --git a/modules/reporting/app/components/cost_reports/index_page_header_component.rb b/modules/reporting/app/components/cost_reports/index_page_header_component.rb
index 7b6fc9e582f..1bcbe184c50 100644
--- a/modules/reporting/app/components/cost_reports/index_page_header_component.rb
+++ b/modules/reporting/app/components/cost_reports/index_page_header_component.rb
@@ -42,8 +42,9 @@ module CostReports
def breadcrumb_items
[
({ href: project_overview_path(@project.id), text: @project.name } if @project.present?),
- { href: url_for({ controller: "cost_reports", action: :index, project_id: @project }),
- text: I18n.t(:cost_reports_title), skip_for_mobile: current_section && current_section.header.present? },
+ { href: module_path,
+ text: I18n.t(:cost_reports_title),
+ skip_for_mobile: !current_section || current_section.header.blank? },
current_breadcrumb_element
].compact
end
@@ -69,5 +70,9 @@ module CostReports
def show_export_button?
@user.allowed_in_any_work_package?(:export_work_packages, in_project: @project)
end
+
+ def module_path
+ @project.present? ? cost_reports_path(@project) : global_cost_reports_path
+ end
end
end
diff --git a/modules/reporting/config/routes.rb b/modules/reporting/config/routes.rb
index 9baf11ce1c8..9e4df2f9f55 100644
--- a/modules/reporting/config/routes.rb
+++ b/modules/reporting/config/routes.rb
@@ -48,7 +48,7 @@ Rails.application.routes.draw do
resources :cost_reports, except: :create do
collection do
- match :index, via: %i[get post]
+ match :index, via: %i[get post], as: :global
post :save_as, action: :create
get :drill_down
match :available_values, via: %i[get post]