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
730286e5
Commit
730286e5
authored
Dec 13, 2021
by
huzaifaiftikhar1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move "Deleted projects" shortcut at the bottom in the navigation menu
parent
14c87fa1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
app/helpers/nav/top_nav_helper.rb
app/helpers/nav/top_nav_helper.rb
+2
-2
ee/app/helpers/ee/nav/top_nav_helper.rb
ee/app/helpers/ee/nav/top_nav_helper.rb
+4
-2
ee/spec/helpers/nav/top_nav_helper_spec.rb
ee/spec/helpers/nav/top_nav_helper_spec.rb
+5
-5
No files found.
app/helpers/nav/top_nav_helper.rb
View file @
730286e5
...
...
@@ -252,14 +252,14 @@ module Nav
}
end
def
projects_submenu
(
builder
)
def
projects_submenu
(
builder
,
should_build
=
true
)
# These project links come from `app/views/layouts/nav/projects_dropdown/_show.html.haml`
builder
.
add_primary_menu_item
(
id:
'your'
,
title:
_
(
'Your projects'
),
href:
dashboard_projects_path
)
builder
.
add_primary_menu_item
(
id:
'starred'
,
title:
_
(
'Starred projects'
),
href:
starred_dashboard_projects_path
)
builder
.
add_primary_menu_item
(
id:
'explore'
,
title:
_
(
'Explore projects'
),
href:
explore_root_path
)
builder
.
add_primary_menu_item
(
id:
'topics'
,
title:
_
(
'Explore topics'
),
href:
topics_explore_projects_path
)
builder
.
add_secondary_menu_item
(
id:
'create'
,
title:
_
(
'Create new project'
),
href:
new_project_path
)
builder
.
build
builder
.
build
if
should_build
end
def
groups_submenu
...
...
ee/app/helpers/ee/nav/top_nav_helper.rb
View file @
730286e5
...
...
@@ -52,12 +52,14 @@ module EE
end
override
:projects_submenu
def
projects_submenu
(
builder
)
def
projects_submenu
(
builder
,
should_build
=
true
)
super
(
builder
,
false
)
if
License
.
feature_available?
(
:adjourned_deletion_for_projects_and_groups
)
builder
.
add_primary_menu_item
(
id:
'deleted'
,
title:
_
(
'Deleted projects'
),
href:
removed_dashboard_projects_path
)
end
super
builder
.
build
if
should_build
end
end
end
...
...
ee/spec/helpers/nav/top_nav_helper_spec.rb
View file @
730286e5
...
...
@@ -132,11 +132,6 @@ RSpec.describe Nav::TopNavHelper do
it
'has expected :linksPrimary'
do
expected_links_primary
=
[
::
Gitlab
::
Nav
::
TopNavMenuItem
.
build
(
href:
'/dashboard/projects/removed'
,
id:
'deleted'
,
title:
'Deleted projects'
),
::
Gitlab
::
Nav
::
TopNavMenuItem
.
build
(
href:
'/dashboard/projects'
,
id:
'your'
,
...
...
@@ -156,6 +151,11 @@ RSpec.describe Nav::TopNavHelper do
href:
'/explore/projects/topics'
,
id:
'topics'
,
title:
'Explore topics'
),
::
Gitlab
::
Nav
::
TopNavMenuItem
.
build
(
href:
'/dashboard/projects/removed'
,
id:
'deleted'
,
title:
'Deleted projects'
)
]
expect
(
projects_view
[
:linksPrimary
]).
to
eq
(
expected_links_primary
)
...
...
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