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
2cae7836
Commit
2cae7836
authored
Jan 18, 2021
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Epic Boards - Add Boards navigation item under Epics
parent
5a50ad78
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
1 deletion
+33
-1
ee/app/views/layouts/nav/ee/_epic_link.html.haml
ee/app/views/layouts/nav/ee/_epic_link.html.haml
+6
-1
ee/config/routes/group.rb
ee/config/routes/group.rb
+4
-0
ee/spec/features/groups/navbar_spec.rb
ee/spec/features/groups/navbar_spec.rb
+23
-0
No files found.
ee/app/views/layouts/nav/ee/_epic_link.html.haml
View file @
2cae7836
-
return
unless
group_sidebar_link?
(
:epics
)
-
epics_count
=
group_epics_count
(
state:
'opened'
)
-
epics_items
=
[
'epics#show'
,
'epics#index'
,
'roadmap#show'
]
-
epics_items
=
[
'epics#show'
,
'epics#index'
,
'
epic_boards#index'
,
'epic_boards#show'
,
'
roadmap#show'
]
=
nav_link
(
path:
epics_items
)
do
=
link_to
group_epics_path
(
group
),
class:
'qa-group-epics-link'
do
...
...
@@ -20,6 +20,11 @@
=
link_to
group_epics_path
(
group
),
title:
'List'
do
%span
=
_
(
'List'
)
-
if
Feature
.
enabled?
(
:epic_boards
,
@group
)
=
nav_link
(
path:
'epic_boards#show'
,
html_options:
{
class:
"
#{
active_when
(
params
[
:board_type
]
==
'epic'
)
}
home"
})
do
=
link_to
group_boards_path
(
group
,
board_type:
"epic"
),
title:
'Boards'
do
%span
=
_
(
'Boards'
)
=
nav_link
(
path:
'roadmap#show'
,
html_options:
{
class:
'home'
})
do
=
link_to
group_roadmap_path
(
group
),
title:
'Roadmap'
do
%span
=
_
(
'Roadmap'
)
ee/config/routes/group.rb
View file @
2cae7836
...
...
@@ -112,6 +112,10 @@ constraints(::Constraints::GroupUrlConstrainer.new) do
resources
:notes
,
only:
[
:index
,
:create
,
:destroy
,
:update
],
concerns: :awardable
,
constraints:
{
id:
/\d+/
}
end
collection
do
resources
:boards
,
only:
[
:index
,
:show
],
as:
'epic_boards'
end
collection
do
post
:bulk_update
end
...
...
ee/spec/features/groups/navbar_spec.rb
View file @
2cae7836
...
...
@@ -66,6 +66,7 @@ RSpec.describe 'Group navbar' do
context
'when epics are available'
do
before
do
stub_licensed_features
(
epics:
true
)
stub_feature_flags
(
epic_boards:
false
)
insert_after_nav_item
(
_
(
'Group overview'
),
...
...
@@ -84,6 +85,28 @@ RSpec.describe 'Group navbar' do
it_behaves_like
'verified navigation bar'
end
context
'when epics and epic boards are available'
do
before
do
stub_licensed_features
(
epics:
true
)
insert_after_nav_item
(
_
(
'Group overview'
),
new_nav_item:
{
nav_item:
_
(
'Epics'
),
nav_sub_items:
[
_
(
'List'
),
_
(
'Boards'
),
_
(
'Roadmap'
)
]
}
)
visit
group_path
(
group
)
end
it_behaves_like
'verified navigation bar'
end
context
'when the logged in user is the owner'
do
before
do
group
.
add_owner
(
user
)
...
...
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