From bbe243060399191abcba33c7ebd611f6ec34c6cd Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 18 Dec 2019 18:08:04 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../layouts/nav/sidebar/_analytics_link.html.haml | 4 +++ .../nav/sidebar/_instance_statistics.html.haml | 29 +++------------------- .../sidebar/_instance_statistics_links.html.haml | 25 +++++++++++++++++++ 3 files changed, 32 insertions(+), 26 deletions(-) create mode 100644 app/views/layouts/nav/sidebar/_analytics_link.html.haml create mode 100644 app/views/layouts/nav/sidebar/_instance_statistics_links.html.haml (limited to 'app/views/layouts/nav/sidebar') diff --git a/app/views/layouts/nav/sidebar/_analytics_link.html.haml b/app/views/layouts/nav/sidebar/_analytics_link.html.haml new file mode 100644 index 00000000000..9e5ae422e2d --- /dev/null +++ b/app/views/layouts/nav/sidebar/_analytics_link.html.haml @@ -0,0 +1,4 @@ +- return unless dashboard_nav_link?(:analytics) += nav_link(controller: [:dev_ops_score, :cohorts]) do + = link_to instance_statistics_root_path, class: 'd-xl-none' do + = _('Analytics') diff --git a/app/views/layouts/nav/sidebar/_instance_statistics.html.haml b/app/views/layouts/nav/sidebar/_instance_statistics.html.haml index 0a84e952442..979d98ec382 100644 --- a/app/views/layouts/nav/sidebar/_instance_statistics.html.haml +++ b/app/views/layouts/nav/sidebar/_instance_statistics.html.haml @@ -1,34 +1,11 @@ .nav-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?) } .nav-sidebar-inner-scroll .context-header - = link_to instance_statistics_root_path, title: _('Instance Statistics') do + = link_to instance_statistics_root_path, title: _('Analytics') do .avatar-container.s40.settings-avatar = sprite_icon('chart', size: 24) - .sidebar-context-title= _('Instance Statistics') + .sidebar-context-title= _('Analytics') %ul.sidebar-top-level-items - = nav_link(controller: :dev_ops_score) do - = link_to instance_statistics_dev_ops_score_index_path do - .nav-icon-container - = sprite_icon('comment') - %span.nav-item-name - = _('DevOps Score') - %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :dev_ops_score, html_options: { class: "fly-out-top-item" } ) do - = link_to instance_statistics_dev_ops_score_index_path do - %strong.fly-out-top-item-name - = _('DevOps Score') - - - if Gitlab::CurrentSettings.usage_ping_enabled - = nav_link(controller: :cohorts) do - = link_to instance_statistics_cohorts_path do - .nav-icon-container - = sprite_icon('users') - %span.nav-item-name - = _('Cohorts') - %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :cohorts, html_options: { class: "fly-out-top-item" } ) do - = link_to instance_statistics_cohorts_path do - %strong.fly-out-top-item-name - = _('Cohorts') + = render 'layouts/nav/sidebar/instance_statistics_links' = render 'shared/sidebar_toggle_button' diff --git a/app/views/layouts/nav/sidebar/_instance_statistics_links.html.haml b/app/views/layouts/nav/sidebar/_instance_statistics_links.html.haml new file mode 100644 index 00000000000..580a25db171 --- /dev/null +++ b/app/views/layouts/nav/sidebar/_instance_statistics_links.html.haml @@ -0,0 +1,25 @@ +- return unless dashboard_nav_link?(:analytics) += nav_link(controller: :dev_ops_score) do + = link_to instance_statistics_dev_ops_score_index_path do + .nav-icon-container + = sprite_icon('comment') + %span.nav-item-name + = _('DevOps Score') + %ul.sidebar-sub-level-items.is-fly-out-only + = nav_link(controller: :dev_ops_score, html_options: { class: "fly-out-top-item" } ) do + = link_to instance_statistics_dev_ops_score_index_path do + %strong.fly-out-top-item-name + = _('DevOps Score') + +- if Gitlab::CurrentSettings.usage_ping_enabled + = nav_link(controller: :cohorts) do + = link_to instance_statistics_cohorts_path do + .nav-icon-container + = sprite_icon('users') + %span.nav-item-name + = _('Cohorts') + %ul.sidebar-sub-level-items.is-fly-out-only + = nav_link(controller: :cohorts, html_options: { class: "fly-out-top-item" } ) do + = link_to instance_statistics_cohorts_path do + %strong.fly-out-top-item-name + = _('Cohorts') -- cgit v1.2.1