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
19c42a20
Commit
19c42a20
authored
Feb 17, 2022
by
Donald Cook
Committed by
Enrique Alcántara
Feb 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed planning hierarchy from left nav
parent
d82662a4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
57 deletions
+0
-57
lib/sidebars/concerns/work_item_hierarchy.rb
lib/sidebars/concerns/work_item_hierarchy.rb
+0
-26
lib/sidebars/projects/menus/project_information_menu.rb
lib/sidebars/projects/menus/project_information_menu.rb
+0
-3
spec/lib/sidebars/concerns/work_item_hierarchy_spec.rb
spec/lib/sidebars/concerns/work_item_hierarchy_spec.rb
+0
-21
spec/lib/sidebars/projects/menus/project_information_menu_spec.rb
.../sidebars/projects/menus/project_information_menu_spec.rb
+0
-6
spec/support/shared_contexts/navbar_structure_context.rb
spec/support/shared_contexts/navbar_structure_context.rb
+0
-1
No files found.
lib/sidebars/concerns/work_item_hierarchy.rb
deleted
100644 → 0
View file @
d82662a4
# frozen_string_literal: true
# This module has the necessary methods to render
# work items hierarchy menu
module
Sidebars
module
Concerns
module
WorkItemHierarchy
def
hierarchy_menu_item
(
container
,
url
,
path
)
unless
show_hierarachy_menu_item?
(
container
)
return
::
Sidebars
::
NilMenuItem
.
new
(
item_id: :hierarchy
)
end
::
Sidebars
::
MenuItem
.
new
(
title:
_
(
'Planning hierarchy'
),
link:
url
,
active_routes:
{
path:
path
},
item_id: :hierarchy
)
end
def
show_hierarachy_menu_item?
(
container
)
can?
(
context
.
current_user
,
:read_planning_hierarchy
,
container
)
end
end
end
end
lib/sidebars/projects/menus/project_information_menu.rb
View file @
19c42a20
...
...
@@ -4,13 +4,10 @@ module Sidebars
module
Projects
module
Menus
class
ProjectInformationMenu
<
::
Sidebars
::
Menu
include
::
Sidebars
::
Concerns
::
WorkItemHierarchy
override
:configure_menu_items
def
configure_menu_items
add_item
(
activity_menu_item
)
add_item
(
labels_menu_item
)
add_item
(
hierarchy_menu_item
(
context
.
project
,
project_planning_hierarchy_path
(
context
.
project
),
'projects#planning_hierarchy'
))
add_item
(
members_menu_item
)
true
...
...
spec/lib/sidebars/concerns/work_item_hierarchy_spec.rb
deleted
100644 → 0
View file @
d82662a4
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
Sidebars
::
Concerns
::
WorkItemHierarchy
do
shared_examples
'hierarchy menu'
do
let
(
:item_id
)
{
:hierarchy
}
specify
{
is_expected
.
not_to
be_nil
}
end
describe
'Project hierarchy menu item'
do
let_it_be_with_reload
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:context
)
{
Sidebars
::
Projects
::
Context
.
new
(
current_user:
user
,
container:
project
)
}
subject
{
Sidebars
::
Projects
::
Menus
::
ProjectInformationMenu
.
new
(
context
).
renderable_items
.
index
{
|
e
|
e
.
item_id
==
item_id
}
}
it_behaves_like
'hierarchy menu'
end
end
spec/lib/sidebars/projects/menus/project_information_menu_spec.rb
View file @
19c42a20
...
...
@@ -59,11 +59,5 @@ RSpec.describe Sidebars::Projects::Menus::ProjectInformationMenu do
specify
{
is_expected
.
to
be_nil
}
end
end
describe
'Hierarchy'
do
let
(
:item_id
)
{
:hierarchy
}
specify
{
is_expected
.
not_to
be_nil
}
end
end
end
spec/support/shared_contexts/navbar_structure_context.rb
View file @
19c42a20
...
...
@@ -22,7 +22,6 @@ RSpec.shared_context 'project navbar structure' do
nav_sub_items:
[
_
(
'Activity'
),
_
(
'Labels'
),
_
(
'Planning hierarchy'
),
_
(
'Members'
)
]
},
...
...
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