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

Hide mobile breadcrumb on home page

Henriette Dargefa888b72645e
diff --git a/app/views/homescreen/index.html.erb b/app/views/homescreen/index.html.erb
index 8e25fc37da4..3d90bccce51 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([I18n.t(:label_home)])
+ header.with_breadcrumbs([I18n.t(:label_home)], skip_home_on_mobile: true)
end
%>
@@ -52,7 +52,7 @@ See COPYRIGHT and LICENSE files for more details.
<% @homescreen[:links].each do |link| %>
<% title = I18n.t(link[:label], scope: "homescreen.links") %>
- <a class="homescreen--links--item" href="<%= link[:url] %>" target="_blank" title="<%= title %>">
+ <a class="homescreen--links--item" href="<%= link[:url] %>" target="_blank" aria-label="<%= title %>">
<%= op_icon(link[:icon]) %>
<%= title %>
</a>
diff --git a/lib/open_project/patches/primer_page_header_breadcrumb.rb b/lib/open_project/patches/primer_page_header_breadcrumb.rb
index 5d06368178b..1a4bc3afc8b 100644
--- a/lib/open_project/patches/primer_page_header_breadcrumb.rb
+++ b/lib/open_project/patches/primer_page_header_breadcrumb.rb
@@ -31,8 +31,10 @@
module OpenProject
module Patches
module PrimerPageHeaderBreadcrumb
- def with_breadcrumbs(breadcrumbs, **)
- super([{ href: home_path, text: helpers.organization_name }] + breadcrumbs, **)
+ def with_breadcrumbs(breadcrumbs, skip_home_on_mobile: false, **)
+ super([{ href: home_path,
+ text: helpers.organization_name,
+ skip_for_mobile: skip_home_on_mobile }] + breadcrumbs, **)
end
end
end