BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
0addef2e
Commit
0addef2e
authored
Sep 29, 2017
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'breadcrumb-item-links' into 'master'
Fixed breadcrumb title not linking Closes #38059 See merge request gitlab-org/gitlab-ce!14532
parents
a481337b
d0737b18
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
9 deletions
+18
-9
breadcrumbs_helper.rb
app/helpers/breadcrumbs_helper.rb
+1
-5
_breadcrumbs.html.haml
app/views/layouts/nav/_breadcrumbs.html.haml
+1
-1
breadcrumb-item-links.yml
changelogs/unreleased/breadcrumb-item-links.yml
+5
-0
issues_spec.rb
spec/features/issues_spec.rb
+8
-0
user_updates_wiki_page_spec.rb
spec/features/projects/wiki/user_updates_wiki_page_spec.rb
+1
-1
user_views_wiki_page_spec.rb
spec/features/projects/wiki/user_views_wiki_page_spec.rb
+2
-2
No files found.
app/helpers/breadcrumbs_helper.rb
View file @
0addef2e
...
...
@@ -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
)
...
...
app/views/layouts/nav/_breadcrumbs.html.haml
View file @
0addef2e
...
...
@@ -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
changelogs/unreleased/breadcrumb-item-links.yml
0 → 100644
View file @
0addef2e
---
title
:
Fixed issue/merge request breadcrumb titles not having links
merge_request
:
author
:
type
:
fixed
spec/features/issues_spec.rb
View file @
0addef2e
...
...
@@ -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
)
...
...
spec/features/projects/wiki/user_updates_wiki_page_spec.rb
View file @
0addef2e
...
...
@@ -40,7 +40,7 @@ describe 'User updates wiki page' do
expect
(
current_path
).
to
include
(
'one/two/three-test'
)
expect
(
find
(
'.wiki-pages'
)).
to
have_content
(
'Three'
)
click_on
(
'Three'
)
first
(
:link
,
text:
'Three'
).
click
expect
(
find
(
'.nav-text'
)).
to
have_content
(
'Three'
)
...
...
spec/features/projects/wiki/user_views_wiki_page_spec.rb
View file @
0addef2e
...
...
@@ -34,7 +34,7 @@ describe 'User views a wiki page' do
it
'shows the history of a page that has a path'
,
:js
do
expect
(
current_path
).
to
include
(
'one/two/three-test'
)
click_on
(
'Three'
)
first
(
:link
,
text:
'Three'
).
click
click_on
(
'Page history'
)
expect
(
current_path
).
to
include
(
'one/two/three-test'
)
...
...
@@ -48,7 +48,7 @@ describe 'User views a wiki page' do
expect
(
current_path
).
to
include
(
'one/two/three-test'
)
expect
(
find
(
'.wiki-pages'
)).
to
have_content
(
'Three'
)
click_on
(
'Three'
)
first
(
:link
,
text:
'Three'
).
click
expect
(
find
(
'.nav-text'
)).
to
have_content
(
'Three'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment