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 forums

Behrokh Satarnejadce34cf28eca6
diff --git a/app/views/forums/index.html.erb b/app/views/forums/index.html.erb
index 73a2c166a9a..41be4ec33ed 100644
--- a/app/views/forums/index.html.erb
+++ b/app/views/forums/index.html.erb
@@ -27,19 +27,27 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
<% html_title t(:label_forum_plural) %>
-<%= toolbar title: t(:label_forum_plural) do %>
- <% if User.current.allowed_in_project?(:manage_forums, @project) %>
- <li class="toolbar-item">
- <%= link_to(new_project_forum_path(@project),
- { aria: { label: t(:label_forum_new) },
- title: t(:label_forum_new),
- class: 'button -primary' }) do %>
- <%= op_icon('button--icon icon-add') %>
- <span class="button--text"><%= t('activerecord.models.forum') %></span>
- <% end %>
- </li>
- <% end %>
-<% end %>
+
+<%=
+ render Primer::OpenProject::PageHeader.new do |header|
+ header.with_title { t(:label_forum_plural) }
+ header.with_breadcrumbs( [
+ { href: project_overview_path(@project.id), text: @project.name },
+ t(:label_forum_plural)
+ ])
+ if User.current.allowed_in_project?(:manage_forums, @project)
+ header.with_action_button(scheme: :primary,
+ mobile_icon: :plus,
+ mobile_label: t(:label_forum_new),
+ aria: { label: t(:label_forum_new) },
+ title: t(:label_forum_new),
+ tag: :a,
+ href: new_project_forum_path(@project)) do |button|
+ button.with_leading_visual_icon(icon: :plus)
+ t('activerecord.models.forum')
+ end
+ end
+ end %>
<% if @forums.empty? %>
<%= no_results_box(action_url: new_project_forum_path(@project)) %>