Skip to content
Snippets Groups Projects
Verified Commit 05844d8b authored by Phil Hughes's avatar Phil Hughes
Browse files

Fixed breadcrumb title not linking

This fixes the breadcrumb titles not having links. This was a regression
in the updated breadcrumbs introduced in 10.0.

This introduces the link for all pages rather than selectively doing it.
This will cover issues, merge requests, pipelines, jobs etc.

Closes #38059
parent aaf435d1
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -10,11 +10,7 @@ module BreadcrumbsHelper
def breadcrumb_title_link
return @breadcrumb_link if @breadcrumb_link
 
if controller.available_action?(:index)
url_for(action: "index")
else
request.path
end
request.path
end
 
def breadcrumb_title(title)
Loading
Loading
Loading
Loading
@@ -16,5 +16,5 @@
= breadcrumb_list_item link_to(extra[:text], extra[:link])
= render "layouts/nav/breadcrumbs/collapsed_dropdown", location: :after
%li
%h2.breadcrumbs-sub-title= @breadcrumb_title
%h2.breadcrumbs-sub-title= link_to @breadcrumb_title, breadcrumb_title_link
= yield :header_content
---
title: Fixed issue/merge request breadcrumb titles not having links
merge_request:
author:
type: fixed
Loading
Loading
@@ -131,6 +131,14 @@ describe 'Issues' do
end
 
describe 'Issue info' do
it 'links to current issue in breadcrubs' do
issue = create(:issue, project: project)
visit project_issue_path(project, issue)
expect(find('.breadcrumbs-sub-title a')[:href]).to end_with(issue_path(issue))
end
it 'excludes award_emoji from comment count' do
issue = create(:issue, author: user, assignees: [user], project: project, title: 'foobar')
create(:award_emoji, awardable: issue)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment