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
b4702282
Commit
b4702282
authored
Jun 23, 2017
by
Douwe Maan
Committed by
kushalpandya
Jun 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'mk-fix-breadcrumb-order-33938' into 'master'
Fix breadcrumb order Closes #33938 See merge request !12322
parent
55e4987f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
groups_helper.rb
app/helpers/groups_helper.rb
+1
-1
mk-fix-breadcrumb-order-33938.yml
changelogs/unreleased/mk-fix-breadcrumb-order-33938.yml
+4
-0
groups_helper_spec.rb
spec/helpers/groups_helper_spec.rb
+13
-0
No files found.
app/helpers/groups_helper.rb
View file @
b4702282
...
@@ -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 @
b4702282
---
title
:
Fix reversed breadcrumb order for nested groups
merge_request
:
12322
author
:
spec/helpers/groups_helper_spec.rb
View file @
b4702282
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