Commit cd10655f authored by George Tsiolis's avatar George Tsiolis

Show navigation line separator when instance metrics is disabled

parent 42873a19
...@@ -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
......
...@@ -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)
......
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