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
a622589c
Commit
a622589c
authored
Nov 14, 2018
by
George Tsiolis
Committed by
Nick Thomas
Nov 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show navigation line separator when instance metrics is disabled
parent
9fe715c5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
6 deletions
+35
-6
app/helpers/nav_helper.rb
app/helpers/nav_helper.rb
+14
-5
app/views/layouts/nav/_dashboard.html.haml
app/views/layouts/nav/_dashboard.html.haml
+1
-1
ee/app/helpers/ee/nav_helper.rb
ee/app/helpers/ee/nav_helper.rb
+15
-0
ee/changelogs/unreleased/gt-show-navigation-line-separator.yml
...angelogs/unreleased/gt-show-navigation-line-separator.yml
+5
-0
No files found.
app/helpers/nav_helper.rb
View file @
a622589c
...
...
@@ -19,11 +19,7 @@ module NavHelper
end
def
page_gutter_class
if
current_path?
(
'merge_requests#show'
)
||
current_path?
(
'projects/merge_requests/conflicts#show'
)
||
current_path?
(
'issues#show'
)
||
current_path?
(
'milestones#show'
)
||
current_path?
(
'epics#show'
)
if
page_has_markdown?
if
cookies
[
:collapsed_gutter
]
==
'true'
%w[page-gutter right-sidebar-collapsed]
...
...
@@ -51,6 +47,17 @@ module NavHelper
class_names
end
def
show_separator?
Gitlab
::
Sherlock
.
enabled?
||
can?
(
current_user
,
:read_instance_statistics
)
end
def
page_has_markdown?
current_path?
(
'merge_requests#show'
)
||
current_path?
(
'projects/merge_requests/conflicts#show'
)
||
current_path?
(
'issues#show'
)
||
current_path?
(
'milestones#show'
)
end
private
def
get_header_links
...
...
@@ -75,3 +82,5 @@ module NavHelper
links
end
end
NavHelper
.
prepend
(
EE
::
NavHelper
)
app/views/layouts/nav/_dashboard.html.haml
View file @
a622589c
...
...
@@ -64,7 +64,7 @@
=
link_to
'#'
,
class:
'dashboard-shortcuts-web-ide'
,
title:
_
(
'Web IDE'
)
do
=
_
(
'Web IDE'
)
-
if
Gitlab
::
Sherlock
.
enabled?
||
can?
(
current_user
,
:read_instance_statistics
)
-
if
show_separator?
%li
.line-separator.d-none.d-sm-block
=
render_if_exists
'dashboard/operations/nav_link'
-
if
can?
(
current_user
,
:read_instance_statistics
)
...
...
ee/app/helpers/ee/nav_helper.rb
0 → 100644
View file @
a622589c
module
EE
module
NavHelper
extend
::
Gitlab
::
Utils
::
Override
override
:show_separator?
def
show_separator?
super
||
can?
(
current_user
,
:read_operations_dashboard
)
end
override
:page_has_markdown?
def
page_has_markdown?
super
||
current_path?
(
'epics#show'
)
end
end
end
ee/changelogs/unreleased/gt-show-navigation-line-separator.yml
0 → 100644
View file @
a622589c
---
title
:
Show navigation line separator when instance etrics is disabled
merge_request
:
8379
author
:
George Tsiolis
type
:
fixed
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