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

update page header in boards pages

Behrokh Satarnejadd814a0e910ce
diff --git a/modules/boards/app/views/boards/boards/new.html.erb b/modules/boards/app/views/boards/boards/new.html.erb
index 1a30bb84913..9ee4af3a1a6 100644
--- a/modules/boards/app/views/boards/boards/new.html.erb
+++ b/modules/boards/app/views/boards/boards/new.html.erb
@@ -32,8 +32,9 @@ 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: project_overview_path(@project.id), text: @project.name },
- { href: project_work_package_boards_path(@project.id), text: 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_work_package_boards_path(@project.id), text: t("boards.label_boards") ] if @project),
t('boards.label_create_new_board')
])
end