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

Create a OP specific patch for the PageHeader to always prepend the organization name as the first element in the breadcrumb

Henriette Darge8d46e97468c0
diff --git a/app/components/notifications/index_page_header_component.rb b/app/components/notifications/index_page_header_component.rb
index dcb1f9fd0d8..6d6eb0f7c16 100644
--- a/app/components/notifications/index_page_header_component.rb
+++ b/app/components/notifications/index_page_header_component.rb
@@ -46,8 +46,7 @@ module Notifications
end
def breadcrumb_items
- [{ href: home_path, text: helpers.organization_name },
- { href: notifications_path, text: I18n.t("js.notifications.title") },
+ [{ href: notifications_path, text: I18n.t("js.notifications.title") },
current_breadcrumb_element]
end
diff --git a/app/components/projects/index_page_header_component.rb b/app/components/projects/index_page_header_component.rb
index 2e6fff5186a..b0a202216b1 100644
--- a/app/components/projects/index_page_header_component.rb
+++ b/app/components/projects/index_page_header_component.rb
@@ -112,7 +112,6 @@ class Projects::IndexPageHeaderComponent < ApplicationComponent
def breadcrumb_items
[
- { href: home_path, text: helpers.organization_name },
{ href: projects_path, text: t(:label_project_plural) },
current_breadcrumb_element
]
diff --git a/app/views/account/lost_password.html.erb b/app/views/account/lost_password.html.erb
index 62ae0cb2b1d..c97b94f35dd 100644
--- a/app/views/account/lost_password.html.erb
+++ b/app/views/account/lost_password.html.erb
@@ -32,8 +32,7 @@ See COPYRIGHT and LICENSE files for more details.
render Primer::OpenProject::PageHeader.new do |header|
header.with_title { t(:label_password_lost) }
header.with_breadcrumbs(
- [{ href: home_path, text: organization_name },
- t(:label_password_lost)]
+ [t(:label_password_lost)]
)
end
%>
diff --git a/app/views/account/password_recovery.html.erb b/app/views/account/password_recovery.html.erb
index 33d456d67ae..5356ff1b5bc 100644
--- a/app/views/account/password_recovery.html.erb
+++ b/app/views/account/password_recovery.html.erb
@@ -32,8 +32,7 @@ See COPYRIGHT and LICENSE files for more details.
render Primer::OpenProject::PageHeader.new do |header|
header.with_title { t(:label_password_lost) }
header.with_breadcrumbs(
- [{ href: home_path, text: organization_name },
- t(:label_password_lost)]
+ [t(:label_password_lost)]
)
end
%>
diff --git a/app/views/activities/index.html.erb b/app/views/activities/index.html.erb
index bfe068e77f1..2ae2301c320 100644
--- a/app/views/activities/index.html.erb
+++ b/app/views/activities/index.html.erb
@@ -34,8 +34,7 @@ See COPYRIGHT and LICENSE files for more details.
header.with_title { (@author.nil? ? t(:label_activity) : t(:label_user_activity, value: link_to_user(@author))).html_safe }
header.with_description { t(:label_date_from_to, start: format_date(@date_to - @days), end: format_date(@date_to - 1)) }
header.with_breadcrumbs(
- [*([href: home_path, text: organization_name] unless @project),
- *([href: project_overview_path(@project.id), text: @project.name] if @project),
+ [*([href: project_overview_path(@project.id), text: @project.name] if @project),
t(:label_activity)]
)
end
diff --git a/app/views/homescreen/index.html.erb b/app/views/homescreen/index.html.erb
index 0354aee8f66..8e25fc37da4 100644
--- a/app/views/homescreen/index.html.erb
+++ b/app/views/homescreen/index.html.erb
@@ -29,7 +29,7 @@ See COPYRIGHT and LICENSE files for more details.
<%=
render(Primer::OpenProject::PageHeader.new) do |header|
header.with_title { I18n.t("label_home") }
- header.with_breadcrumbs([{ href: home_path, text: organization_name }, I18n.t(:label_home)])
+ header.with_breadcrumbs([I18n.t(:label_home)])
end
%>
diff --git a/app/views/news/edit.html.erb b/app/views/news/edit.html.erb
index 49127a8417e..f3d59f71b21 100644
--- a/app/views/news/edit.html.erb
+++ b/app/views/news/edit.html.erb
@@ -32,8 +32,7 @@ See COPYRIGHT and LICENSE files for more details.
render Primer::OpenProject::PageHeader.new do |header|
header.with_title { @news.title }
header.with_breadcrumbs(
- [*([href: home_path, text: organization_name] unless @project),
- *([href: project_overview_path(@project.id), text: @project.name] if @project),
+ [*([href: project_overview_path(@project.id), text: @project.name] if @project),
*([href: project_news_index_path(@project.id), text: t(:label_news_plural)] if @project),
@news.title]
)
diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb
index 300d7425694..5fe57f6f2df 100644
--- a/app/views/news/index.html.erb
+++ b/app/views/news/index.html.erb
@@ -37,8 +37,7 @@ See COPYRIGHT and LICENSE files for more details.
render Primer::OpenProject::PageHeader.new do |header|
header.with_title { t(:label_news_plural) }
header.with_breadcrumbs(
- [*([href: home_path, text: organization_name] unless @project),
- *([href: project_overview_path(@project.id), text: @project.name] if @project),
+ [*([href: project_overview_path(@project.id), text: @project.name] if @project),
t(:label_news_plural)]
)
end
diff --git a/app/views/news/show.html.erb b/app/views/news/show.html.erb
index 8dd081cbb25..4dfd8b1b224 100644
--- a/app/views/news/show.html.erb
+++ b/app/views/news/show.html.erb
@@ -31,8 +31,7 @@ See COPYRIGHT and LICENSE files for more details.
render Primer::OpenProject::PageHeader.new do |header|
header.with_title { "#{avatar(@news.author)} #{h @news.title}".html_safe }
header.with_breadcrumbs(
- [*([href: home_path, text: organization_name] unless @project),
- *([href: project_overview_path(@project.id), text: @project.name] if @project),
+ [*([href: project_overview_path(@project.id), text: @project.name] if @project),
*([href: project_news_index_path(@project.id), text: t(:label_news_plural)] if @project),
@news.title]
)
diff --git a/app/views/projects/new.html.erb b/app/views/projects/new.html.erb
index d8f9fc8e599..eedf76c1ad1 100644
--- a/app/views/projects/new.html.erb
+++ b/app/views/projects/new.html.erb
@@ -30,7 +30,7 @@ See COPYRIGHT and LICENSE files for more details.
<%=
render(Primer::OpenProject::PageHeader.new) do |header|
header.with_title { t(:label_project_new) }
- header.with_breadcrumbs([{ href: home_path, text: organization_name }, t(:label_project_new)])
+ header.with_breadcrumbs([t(:label_project_new)])
end
%>
diff --git a/frontend/src/app/features/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts b/frontend/src/app/features/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts
index 1350f10fea0..b0d76df9b5a 100644
--- a/frontend/src/app/features/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts
+++ b/frontend/src/app/features/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts
@@ -179,6 +179,7 @@ export class IFCViewerPageComponent extends PartitionedQuerySpacePageComponent i
breadcrumbItems() {
return [
+ { href: this.pathHelperService.homePath(), text: this.titleService.appTitle },
{ href: this.pathHelperService.projectPath(this.currentProject.identifier as string), text: (this.currentProject.name) },
{ href: this.pathHelperService.projectBCFPath(this.currentProject.identifier as string), text: this.I18n.t('js.bcf.label_bcf') },
this.selectedTitle?? '',
diff --git a/frontend/src/app/features/boards/board/board-partitioned-page/board-partitioned-page.component.ts b/frontend/src/app/features/boards/board/board-partitioned-page/board-partitioned-page.component.ts
index 41eba276009..9fb2abe638d 100644
--- a/frontend/src/app/features/boards/board/board-partitioned-page/board-partitioned-page.component.ts
+++ b/frontend/src/app/features/boards/board/board-partitioned-page/board-partitioned-page.component.ts
@@ -200,6 +200,7 @@ export class BoardPartitionedPageComponent extends UntilDestroyedMixin {
breadcrumbItems() {
return [
+ { href: this.pathHelperService.homePath(), text: this.titleService.appTitle },
{ href: this.pathHelperService.projectPath(this.currentProject.identifier as string), text: (this.currentProject.name) },
{ href: this.pathHelperService.boardsPath(this.currentProject.identifier as string), text: this.I18n.t('js.label_board_plural') },
this.selectedTitle?? '',
diff --git a/frontend/src/app/features/calendar/wp-calendar-page/wp-calendar-page.component.ts b/frontend/src/app/features/calendar/wp-calendar-page/wp-calendar-page.component.ts
index 7ce31c841d9..c749d8366e0 100644
--- a/frontend/src/app/features/calendar/wp-calendar-page/wp-calendar-page.component.ts
+++ b/frontend/src/app/features/calendar/wp-calendar-page/wp-calendar-page.component.ts
@@ -74,6 +74,7 @@ export class WorkPackagesCalendarPageComponent extends PartitionedQuerySpacePage
breadcrumbItems() {
return [
+ { href: this.pathHelperService.homePath(), text: this.titleService.appTitle },
{ href: this.pathHelperService.projectPath(this.currentProject.identifier as string), text: (this.currentProject.name) },
{ href: this.pathHelperService.projectCalendarPath(this.currentProject.identifier as string), text: this.I18n.t('js.calendar.label_calendar_plural') },
this.selectedTitle?? '',
diff --git a/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts b/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts
index 2988cba02c9..d9ed51f5849 100644
--- a/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts
+++ b/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts
@@ -125,6 +125,7 @@ export class TeamPlannerPageComponent extends PartitionedQuerySpacePageComponent
breadcrumbItems() {
return [
+ { href: this.pathHelperService.homePath(), text: this.titleService.appTitle },
{ href: this.pathHelperService.projectPath(this.currentProject.identifier as string), text: (this.currentProject.name) },
{ href: this.pathHelperService.projectTeamplannerPath(this.currentProject.identifier as string), text: this.I18n.t('js.team_planner.label_team_planner_plural') },
this.selectedTitle?? '',
diff --git a/frontend/src/app/features/work-packages/routing/wp-view-page/wp-view-page.component.ts b/frontend/src/app/features/work-packages/routing/wp-view-page/wp-view-page.component.ts
index 627128a1bd8..4f7758a01ee 100644
--- a/frontend/src/app/features/work-packages/routing/wp-view-page/wp-view-page.component.ts
+++ b/frontend/src/app/features/work-packages/routing/wp-view-page/wp-view-page.component.ts
@@ -45,6 +45,7 @@ import { of } from 'rxjs';
import { WorkPackageFoldToggleButtonComponent } from 'core-app/features/work-packages/components/wp-buttons/wp-fold-toggle-button/wp-fold-toggle-button.component';
import { OpProjectIncludeComponent } from 'core-app/shared/components/project-include/project-include.component';
import { OpBaselineModalComponent } from 'core-app/features/work-packages/components/wp-baseline/baseline-modal/baseline-modal.component';
+import { BreadcrumbItem } from 'core-app/shared/components/breadcrumbs/op-breadcrumbs.component';
@Component({
selector: 'wp-view-page',
@@ -109,20 +110,20 @@ export class WorkPackageViewPageComponent extends PartitionedQuerySpacePageCompo
}
breadcrumbItems() {
- const items = [];
+ const items:BreadcrumbItem[] = [{
+ href: this.pathHelperService.homePath(),
+ text: this.titleService.appTitle,
+ }];
if (this.currentProject?.identifier) {
items.push({
href: this.pathHelperService.projectPath(this.currentProject.identifier),
- text: this.currentProject.name,
- });
- } else {
- items.push({
- href: this.pathHelperService.homePath(),
- text: this.titleService.appTitle,
+ text: this.currentProject.name as string,
});
}
+
items.push(this.breadcrumbModuleEntry());
+
if (this.selectedTitle) {
items.push(this.selectedTitle);
}
diff --git a/lib/open_project/patches/primer_page_header_breadcrumb.rb b/lib/open_project/patches/primer_page_header_breadcrumb.rb
new file mode 100644
index 00000000000..af6717b1260
--- /dev/null
+++ b/lib/open_project/patches/primer_page_header_breadcrumb.rb
@@ -0,0 +1,41 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module OpenProject
+ module Patches
+ module PrimerPageHeaderBreadcrumb
+ def with_breadcrumbs(breadcrumbs, **)
+ super([{ href: home_path, text: helpers.organization_name}] + breadcrumbs, **)
+ end
+ end
+ end
+end
+
+OpenProject::Patches.patch_gem_version "openproject-primer_view_components", "0.70.2" do
+ Primer::OpenProject::PageHeader.prepend OpenProject::Patches::PrimerPageHeaderBreadcrumb
+end
diff --git a/modules/boards/app/views/boards/boards/index.html.erb b/modules/boards/app/views/boards/boards/index.html.erb
index 75e4440e778..524bb0cccfd 100644
--- a/modules/boards/app/views/boards/boards/index.html.erb
+++ b/modules/boards/app/views/boards/boards/index.html.erb
@@ -33,8 +33,7 @@ See COPYRIGHT and LICENSE files for more details.
render Primer::OpenProject::PageHeader.new do |header|
header.with_title { t("boards.label_boards") }
header.with_breadcrumbs(
- [*([href: home_path, text: organization_name] unless @project),
- *([href: project_overview_path(@project.id), text: @project.name] if @project),
+ [*([href: project_overview_path(@project.id), text: @project.name] if @project),
t("boards.label_boards")]
)
end
diff --git a/modules/boards/app/views/boards/boards/new.html.erb b/modules/boards/app/views/boards/boards/new.html.erb
index c9a52fad09d..da90c86177b 100644
--- a/modules/boards/app/views/boards/boards/new.html.erb
+++ b/modules/boards/app/views/boards/boards/new.html.erb
@@ -33,8 +33,7 @@ See COPYRIGHT and LICENSE files for more details.
render Primer::OpenProject::PageHeader.new do |header|
header.with_title { t("boards.label_create_new_board") }
header.with_breadcrumbs(
- [*([href: home_path, text: organization_name] unless @project),
- *([href: project_overview_path(@project.id), text: @project.name] if @project),
+ [*([href: project_overview_path(@project.id), text: @project.name] if @project),
*([href: project_work_package_boards_path(@project.id), text: t("boards.label_boards")] if @project),
t("boards.label_create_new_board")]
)
diff --git a/modules/calendar/app/views/calendar/calendars/index.html.erb b/modules/calendar/app/views/calendar/calendars/index.html.erb
index cf97456f90d..4d41239814d 100644
--- a/modules/calendar/app/views/calendar/calendars/index.html.erb
+++ b/modules/calendar/app/views/calendar/calendars/index.html.erb
@@ -32,8 +32,7 @@ See COPYRIGHT and LICENSE files for more details.
render Primer::OpenProject::PageHeader.new do |header|
header.with_title { t(:label_calendar_plural) }
header.with_breadcrumbs(
- [*([href: home_path, text: organization_name] unless @project),
- *([href: project_overview_path(@project.id), text: @project.name] if @project),
+ [*([href: project_overview_path(@project.id), text: @project.name] if @project),
t(:label_calendar_plural)]
)
end
diff --git a/modules/calendar/app/views/calendar/calendars/new.html.erb b/modules/calendar/app/views/calendar/calendars/new.html.erb
index fea58db439e..0de4281096f 100644
--- a/modules/calendar/app/views/calendar/calendars/new.html.erb
+++ b/modules/calendar/app/views/calendar/calendars/new.html.erb
@@ -33,8 +33,7 @@ See COPYRIGHT and LICENSE files for more details.
render Primer::OpenProject::PageHeader.new do |header|
header.with_title { t(:label_new_calendar) }
header.with_breadcrumbs(
- [{ href: home_path, text: organization_name },
- { href: calendars_path, text: t(:label_calendar_plural) },
+ [{ href: calendars_path, text: t(:label_calendar_plural) },
t(:label_new_calendar)]
)
end
diff --git a/modules/costs/app/components/my/time_tracking/header_component.html.erb b/modules/costs/app/components/my/time_tracking/header_component.html.erb
index b1b6f725b5c..d0ee993b5c9 100644
--- a/modules/costs/app/components/my/time_tracking/header_component.html.erb
+++ b/modules/costs/app/components/my/time_tracking/header_component.html.erb
@@ -2,7 +2,6 @@
header.with_title { I18n.t(:label_my_time_tracking) }
header.with_breadcrumbs(
[
- { href: home_path, text: helpers.organization_name },
{ text: I18n.t(:label_my_time_tracking), href: my_time_tracking_path }
]
)
diff --git a/modules/costs/app/views/hourly_rates/edit.html.erb b/modules/costs/app/views/hourly_rates/edit.html.erb
index fd359ff0146..2c230e9fd15 100644
--- a/modules/costs/app/views/hourly_rates/edit.html.erb
+++ b/modules/costs/app/views/hourly_rates/edit.html.erb
@@ -34,7 +34,7 @@ See COPYRIGHT and LICENSE files for more details.
[{ href: project_overview_path(@project.identifier), text: @project.name },
{ href: projects_budgets_path(@project.identifier), text: I18n.t(:label_budget_plural) }]
else
- [{ href: home_path, text: organization_name }]
+ []
end
%>
diff --git a/modules/costs/app/views/hourly_rates/show.html.erb b/modules/costs/app/views/hourly_rates/show.html.erb
index 2f8816bbffa..54c88ddcddd 100644
--- a/modules/costs/app/views/hourly_rates/show.html.erb
+++ b/modules/costs/app/views/hourly_rates/show.html.erb
@@ -34,7 +34,7 @@ See COPYRIGHT and LICENSE files for more details.
[{ href: project_overview_path(@project.identifier), text: @project.name },
{ href: projects_budgets_path(@project.identifier), text: I18n.t(:label_budget_plural) }]
else
- [{ href: home_path, text: organization_name }]
+ []
end
%>
diff --git a/modules/meeting/app/components/meetings/header_component.rb b/modules/meeting/app/components/meetings/header_component.rb
index ea42f3d24d8..aeb1534878f 100644
--- a/modules/meeting/app/components/meetings/header_component.rb
+++ b/modules/meeting/app/components/meetings/header_component.rb
@@ -75,7 +75,7 @@ module Meetings
def breadcrumb_items
[
- parent_element,
+ *([{ href: project_overview_path(@project.id), text: @project.name }] if @project.present?),
{ href: @project.present? ? project_meetings_path(@project.id) : meetings_path,
text: I18n.t(:label_meeting_plural) },
meeting_series_element,
@@ -99,14 +99,6 @@ module Meetings
end
end
- def parent_element
- if @project.present?
- { href: project_overview_path(@project.id), text: @project.name }
- else
- { href: home_path, text: helpers.organization_name }
- end
- end
-
def delete_label
if @series.present?
I18n.t("label_recurring_meeting_cancel")
diff --git a/modules/meeting/app/components/meetings/index_page_header_component.rb b/modules/meeting/app/components/meetings/index_page_header_component.rb
index 186f0dd4cd0..d61229b89b3 100644
--- a/modules/meeting/app/components/meetings/index_page_header_component.rb
+++ b/modules/meeting/app/components/meetings/index_page_header_component.rb
@@ -46,20 +46,12 @@ module Meetings
end
def breadcrumb_items
- [parent_element,
+ [*([{ href: project_overview_path(@project.id), text: @project.name }] if @project.present?),
{ href: url_for({ controller: "meetings", action: :index, project_id: @project }),
text: I18n.t(:label_meeting_plural) },
current_breadcrumb_element]
end
- def parent_element
- if @project.present?
- { href: project_overview_path(@project.id), text: @project.name }
- else
- { href: home_path, text: helpers.organization_name }
- end
- end
-
def current_breadcrumb_element
if section_present?
helpers.nested_breadcrumb_element(current_section.header, page_title)
diff --git a/modules/meeting/app/components/recurring_meetings/show_page_header_component.rb b/modules/meeting/app/components/recurring_meetings/show_page_header_component.rb
index dc7fea60b79..3636394d294 100644
--- a/modules/meeting/app/components/recurring_meetings/show_page_header_component.rb
+++ b/modules/meeting/app/components/recurring_meetings/show_page_header_component.rb
@@ -83,18 +83,10 @@ module RecurringMeetings
end
def breadcrumb_items
- [parent_element,
+ [*([{ href: project_overview_path(@project.id), text: @project.name }] if @project.present?),
{ href: @project.present? ? project_meetings_path(@project.id) : meetings_path,
text: I18n.t(:label_meeting_plural) },
page_title(true)]
end
-
- def parent_element
- if @project.present?
- { href: project_overview_path(@project.id), text: @project.name }
- else
- { href: home_path, text: I18n.t(:label_home) }
- end
- end
end
end
diff --git a/modules/meeting/app/views/recurring_meetings/new.html.erb b/modules/meeting/app/views/recurring_meetings/new.html.erb
index 0784a8ebd36..b17a5736112 100644
--- a/modules/meeting/app/views/recurring_meetings/new.html.erb
+++ b/modules/meeting/app/views/recurring_meetings/new.html.erb
@@ -31,11 +31,7 @@ See COPYRIGHT and LICENSE files for more details.
render(Primer::OpenProject::PageHeader.new) do |header|
header.with_title { t(:label_recurring_meeting_new) }
header.with_breadcrumbs(
- [if @project.present?
- { href: project_overview_path(@project.id), text: @project.name }
- else
- { href: home_path, text: I18n.t(:label_home) }
- end,
+ [*([{ href: project_overview_path(@project.id), text: @project.name }] if @project.present?),
{ href: @project.present? ? project_recurring_meetings_path(@project.id) : recurring_meetings_path,
text: I18n.t(:label_meeting_plural) },
t(:label_recurring_meeting_new)]
diff --git a/modules/my_page/app/views/my/page/show.html.erb b/modules/my_page/app/views/my/page/show.html.erb
index 3eb27c87c3d..3da4d4759f5 100644
--- a/modules/my_page/app/views/my/page/show.html.erb
+++ b/modules/my_page/app/views/my/page/show.html.erb
@@ -5,7 +5,6 @@
header.with_title { t("my_page.label") }
header.with_breadcrumbs(
[
- { href: home_path, text: organization_name },
t("my_page.label")
]
)
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 e9b137d3ff8..aeddab9323a 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
@@ -44,20 +44,12 @@ module CostReports
end
def breadcrumb_items
- [parent_element,
+ [*([{ 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) },
current_breadcrumb_element]
end
- def parent_element
- if @project.present?
- { href: project_overview_path(@project.id), text: @project.name }
- else
- { href: home_path, text: helpers.organization_name }
- end
- end
-
def current_breadcrumb_element
return I18n.t(:label_new_report) unless @query.persisted?
diff --git a/modules/team_planner/app/views/team_planner/team_planner/new.html.erb b/modules/team_planner/app/views/team_planner/team_planner/new.html.erb
index 1c0454d3bae..e54051de008 100644
--- a/modules/team_planner/app/views/team_planner/team_planner/new.html.erb
+++ b/modules/team_planner/app/views/team_planner/team_planner/new.html.erb
@@ -32,8 +32,7 @@ See COPYRIGHT and LICENSE files for more details.
render(Primer::OpenProject::PageHeader.new) do |header|
header.with_title { t("team_planner.label_new_team_planner") }
header.with_breadcrumbs(
- [*([href: home_path, text: organization_name] unless @project),
- *([href: project_overview_path(@project.id), text: @project.name] if @project),
+ [*([href: project_overview_path(@project.id), text: @project.name] if @project),
t("team_planner.label_new_team_planner")]
)
end
diff --git a/modules/team_planner/app/views/team_planner/team_planner/overview.html.erb b/modules/team_planner/app/views/team_planner/team_planner/overview.html.erb
index e8ca63d351c..0df7db59d66 100644
--- a/modules/team_planner/app/views/team_planner/team_planner/overview.html.erb
+++ b/modules/team_planner/app/views/team_planner/team_planner/overview.html.erb
@@ -3,8 +3,7 @@
render Primer::OpenProject::PageHeader.new do |header|
header.with_title { t("team_planner.label_team_planner_plural") }
header.with_breadcrumbs(
- [{ href: home_path, text: organization_name },
- t("team_planner.label_team_planner_plural")]
+ [t("team_planner.label_team_planner_plural")]
)
end
%>