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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
cd10655f
Commit
cd10655f
authored
Nov 09, 2018
by
George Tsiolis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show navigation line separator when instance metrics is disabled
parent
42873a19
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
app/helpers/nav_helper.rb
app/helpers/nav_helper.rb
+12
-4
app/views/layouts/nav/_dashboard.html.haml
app/views/layouts/nav/_dashboard.html.haml
+1
-1
No files found.
app/helpers/nav_helper.rb
View file @
cd10655f
...
@@ -19,10 +19,7 @@ module NavHelper
...
@@ -19,10 +19,7 @@ module NavHelper
end
end
def
page_gutter_class
def
page_gutter_class
if
current_path?
(
'merge_requests#show'
)
||
if
page_has_markdown?
current_path?
(
'projects/merge_requests/conflicts#show'
)
||
current_path?
(
'issues#show'
)
||
current_path?
(
'milestones#show'
)
if
cookies
[
:collapsed_gutter
]
==
'true'
if
cookies
[
:collapsed_gutter
]
==
'true'
%w[page-gutter right-sidebar-collapsed]
%w[page-gutter right-sidebar-collapsed]
...
@@ -50,6 +47,17 @@ module NavHelper
...
@@ -50,6 +47,17 @@ module NavHelper
class_names
class_names
end
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
private
def
get_header_links
def
get_header_links
...
...
app/views/layouts/nav/_dashboard.html.haml
View file @
cd10655f
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
=
link_to
'#'
,
class:
'dashboard-shortcuts-web-ide'
,
title:
_
(
'Web IDE'
)
do
=
link_to
'#'
,
class:
'dashboard-shortcuts-web-ide'
,
title:
_
(
'Web IDE'
)
do
=
_
(
'Web IDE'
)
=
_
(
'Web IDE'
)
-
if
Gitlab
::
Sherlock
.
enabled?
||
can?
(
current_user
,
:read_instance_statistics
)
-
if
show_separator?
%li
.line-separator.d-none.d-sm-block
%li
.line-separator.d-none.d-sm-block
=
render_if_exists
'dashboard/operations/nav_link'
=
render_if_exists
'dashboard/operations/nav_link'
-
if
can?
(
current_user
,
:read_instance_statistics
)
-
if
can?
(
current_user
,
:read_instance_statistics
)
...
...
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