Files
openproject/app/components/repositories/page_header_component.html.erb
Behrokh Satarnejad 8474cd8751 [64111] Use Primer PageHeader in repositories (#19001)
* create a helper for breadcrumbs in repositories

* move breadcrumbs to the header partial

* use page header action buttons instead of toolbar items

* use page header icon action buttons

* add page header to revisions page

* add page header to statistics page

* remove breadcrumbs in annotate, changes and entry pages

* change diff page

* change revision page and add page header component

* fix rubocup errors

* fix failing tests

* check breadcrumbs class in test

* remove test for checking the title

* fix breadcrumbs helper

* add checkout instructions toggle

* fix test for title check

* fix Assignment Branch Condition size error

* fix error while lading revision pages

* remove toolbar items classes usages

* use project id

* move page header of revision page into a component

* move page header of repository page into a component

* remove toolbar classes

* fix failing specs

* remove toolbar usages

* Re-add hook and change breadcrumb slightly

* Simplify PageHeader button template

* Replace custom input group with Primer component

* Cleanup sass code

* Correct the method for getting the "next_button" tag

---------

Co-authored-by: Henriette Darge <h.darge@openproject.com>
2025-06-11 13:14:32 +02:00

36 lines
1.1 KiB
Plaintext

<%=
render Primer::OpenProject::PageHeader.new do |header|
header.with_title { t(
"repositories.named_repository",
vendor_name: @repository.class.vendor_name
) }
header.with_breadcrumbs(breadcrumb_items)
if !@empty && User.current.allowed_in_project?(:browse_repository, @project)
header.with_action_icon_button(
tag: :a,
icon: :graph,
label: t(:label_statistics),
mobile_icon: :graph,
mobile_label: t(:label_statistics),
size: :medium,
href: stats_project_repository_path(@project),
aria: { label: t(:label_statistics) },
title: t(:label_statistics)
)
end
if User.current.allowed_in_project?(:manage_repository, @project)
header.with_action_icon_button(
tag: :a,
icon: :gear,
label: t(:label_setting_plural),
mobile_icon: :gear,
mobile_label: t(:label_setting_plural),
size: :medium,
href: project_settings_repository_path(@project),
aria: { label: t(:label_setting_plural) },
title: t(:label_setting_plural)
)
end
end
%>