Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
1f3225a5
Commit
1f3225a5
authored
Jun 23, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'mk-fix-breadcrumb-order-33938' into 'master'
Fix breadcrumb order Closes #33938 See merge request !12322
parents
788f5415
466adeeb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
app/helpers/groups_helper.rb
app/helpers/groups_helper.rb
+1
-1
changelogs/unreleased/mk-fix-breadcrumb-order-33938.yml
changelogs/unreleased/mk-fix-breadcrumb-order-33938.yml
+4
-0
spec/helpers/groups_helper_spec.rb
spec/helpers/groups_helper_spec.rb
+13
-0
No files found.
app/helpers/groups_helper.rb
View file @
1f3225a5
...
@@ -15,7 +15,7 @@ module GroupsHelper
...
@@ -15,7 +15,7 @@ module GroupsHelper
@has_group_title
=
true
@has_group_title
=
true
full_title
=
''
full_title
=
''
group
.
ancestors
.
each
do
|
parent
|
group
.
ancestors
.
reverse
.
each
do
|
parent
|
full_title
+=
link_to
(
simple_sanitize
(
parent
.
name
),
group_path
(
parent
),
class:
'group-path hidable'
)
full_title
+=
link_to
(
simple_sanitize
(
parent
.
name
),
group_path
(
parent
),
class:
'group-path hidable'
)
full_title
+=
'<span class="hidable"> / </span>'
.
html_safe
full_title
+=
'<span class="hidable"> / </span>'
.
html_safe
end
end
...
...
changelogs/unreleased/mk-fix-breadcrumb-order-33938.yml
0 → 100644
View file @
1f3225a5
---
title
:
Fix reversed breadcrumb order for nested groups
merge_request
:
12322
author
:
spec/helpers/groups_helper_spec.rb
View file @
1f3225a5
require
'spec_helper'
require
'spec_helper'
describe
GroupsHelper
do
describe
GroupsHelper
do
include
ApplicationHelper
describe
'group_icon'
do
describe
'group_icon'
do
avatar_file_path
=
File
.
join
(
Rails
.
root
,
'spec'
,
'fixtures'
,
'banana_sample.gif'
)
avatar_file_path
=
File
.
join
(
Rails
.
root
,
'spec'
,
'fixtures'
,
'banana_sample.gif'
)
...
@@ -81,4 +83,15 @@ describe GroupsHelper do
...
@@ -81,4 +83,15 @@ describe GroupsHelper do
end
end
end
end
end
end
describe
'group_title'
do
let
(
:group
)
{
create
(
:group
)
}
let
(
:nested_group
)
{
create
(
:group
,
parent:
group
)
}
let
(
:deep_nested_group
)
{
create
(
:group
,
parent:
nested_group
)
}
let!
(
:very_deep_nested_group
)
{
create
(
:group
,
parent:
deep_nested_group
)
}
it
'outputs the groups in the correct order'
do
expect
(
group_title
(
very_deep_nested_group
)).
to
match
(
/>
#{
group
.
name
}
<\/a>.*>
#{
nested_group
.
name
}
<\/a>.*>
#{
deep_nested_group
.
name
}
<\/a>/
)
end
end
end
end
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