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

show correct breadcrumb in team planner page for the time that there is a project selected

Behrokh Satarnejadf8801ea9af7a
diff --git a/modules/team_planner/app/views/team_planner/team_planner/index.html.erb b/modules/team_planner/app/views/team_planner/team_planner/index.html.erb
index 10f9bfa3de4..0c6c18f9fb1 100644
--- a/modules/team_planner/app/views/team_planner/team_planner/index.html.erb
+++ b/modules/team_planner/app/views/team_planner/team_planner/index.html.erb
@@ -1,7 +1,20 @@
<% html_title(t('team_planner.label_team_planner_plural')) -%>
-<%= toolbar title: t(:'team_planner.label_team_planner_plural') do %>
- <%= render ::TeamPlanner::AddButtonComponent.new(current_project: @project) %>
-<% end %>
+<%=
+ 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},
+ { href: project_overview_path(@project.id), text: @project.name },
+ t('team_planner.label_team_planner_plural')])
+ end
+%>
+
+<%=
+ render Primer::OpenProject::SubHeader.new do |subheader|
+ subheader.with_action_component do
+ render ::TeamPlanner::AddButtonComponent.new(current_project: @project)
+ end
+ end
+%>
<%= render ::TeamPlanner::TableComponent.new(rows: @views, current_user: current_user) %>
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 f05659fb797..a123874b152 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
@@ -2,7 +2,8 @@
<%=
render Primer::OpenProject::PageHeader.new do |header|
header.with_title { t('team_planner.label_team_planner_plural') }
- header.with_breadcrumbs([t('team_planner.label_team_planner_plural')])
+ header.with_breadcrumbs([{ href: home_path, text: organization_name},
+ t('team_planner.label_team_planner_plural')])
end
%>