Commit 07d0ba35 authored by Nick Thomas's avatar Nick Thomas

Merge branch 'gt-show-navigation-line-separator' into 'master'

Show navigation line separator when instance metrics is disabled

Closes #8363

See merge request gitlab-org/gitlab-ee!8379
parents 9fe715c5 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)
......@@ -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)
......
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
---
title: Show navigation line separator when instance etrics is disabled
merge_request: 8379
author: George Tsiolis
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment