From 602a1c34e33d75940c7acbf4a31a65e187dbbfde Mon Sep 17 00:00:00 2001 From: Luke Bennett Date: Wed, 18 Jul 2018 01:37:58 +0100 Subject: Create instance_statistics namespace and move convdev index and cohorts to it --- app/controllers/admin/cohorts_controller.rb | 11 -------- .../conversational_development_index_controller.rb | 5 ---- .../instance_statistics/application_controller.rb | 14 +++++++++ .../instance_statistics/cohorts_controller.rb | 11 ++++++++ .../conversational_development_index_controller.rb | 7 +++++ .../admin/application_settings/_usage.html.haml | 2 +- app/views/admin/cohorts/_cohorts_table.html.haml | 28 ------------------ app/views/admin/cohorts/_usage_ping.html.haml | 10 ------- app/views/admin/cohorts/index.html.haml | 16 ----------- .../_callout.html.haml | 13 --------- .../_card.html.haml | 25 ---------------- .../_disabled.html.haml | 9 ------ .../_no_data.html.haml | 7 ----- .../show.html.haml | 33 ---------------------- .../cohorts/_cohorts_table.html.haml | 28 ++++++++++++++++++ .../cohorts/_usage_ping.html.haml | 10 +++++++ .../instance_statistics/cohorts/index.html.haml | 16 +++++++++++ .../_callout.html.haml | 13 +++++++++ .../_card.html.haml | 25 ++++++++++++++++ .../_disabled.html.haml | 9 ++++++ .../_no_data.html.haml | 7 +++++ .../index.html.haml | 33 ++++++++++++++++++++++ app/views/layouts/instance_statistics.html.haml | 6 ++++ app/views/layouts/nav/sidebar/_admin.html.haml | 4 +-- .../nav/sidebar/_instance_statistics.html.haml | 33 ++++++++++++++++++++++ 25 files changed, 215 insertions(+), 160 deletions(-) delete mode 100644 app/controllers/admin/cohorts_controller.rb delete mode 100644 app/controllers/admin/conversational_development_index_controller.rb create mode 100644 app/controllers/instance_statistics/application_controller.rb create mode 100644 app/controllers/instance_statistics/cohorts_controller.rb create mode 100644 app/controllers/instance_statistics/conversational_development_index_controller.rb delete mode 100644 app/views/admin/cohorts/_cohorts_table.html.haml delete mode 100644 app/views/admin/cohorts/_usage_ping.html.haml delete mode 100644 app/views/admin/cohorts/index.html.haml delete mode 100644 app/views/admin/conversational_development_index/_callout.html.haml delete mode 100644 app/views/admin/conversational_development_index/_card.html.haml delete mode 100644 app/views/admin/conversational_development_index/_disabled.html.haml delete mode 100644 app/views/admin/conversational_development_index/_no_data.html.haml delete mode 100644 app/views/admin/conversational_development_index/show.html.haml create mode 100644 app/views/instance_statistics/cohorts/_cohorts_table.html.haml create mode 100644 app/views/instance_statistics/cohorts/_usage_ping.html.haml create mode 100644 app/views/instance_statistics/cohorts/index.html.haml create mode 100644 app/views/instance_statistics/conversational_development_index/_callout.html.haml create mode 100644 app/views/instance_statistics/conversational_development_index/_card.html.haml create mode 100644 app/views/instance_statistics/conversational_development_index/_disabled.html.haml create mode 100644 app/views/instance_statistics/conversational_development_index/_no_data.html.haml create mode 100644 app/views/instance_statistics/conversational_development_index/index.html.haml create mode 100644 app/views/layouts/instance_statistics.html.haml create mode 100644 app/views/layouts/nav/sidebar/_instance_statistics.html.haml (limited to 'app') diff --git a/app/controllers/admin/cohorts_controller.rb b/app/controllers/admin/cohorts_controller.rb deleted file mode 100644 index 10d9d1b5345..00000000000 --- a/app/controllers/admin/cohorts_controller.rb +++ /dev/null @@ -1,11 +0,0 @@ -class Admin::CohortsController < Admin::ApplicationController - def index - if Gitlab::CurrentSettings.usage_ping_enabled - cohorts_results = Rails.cache.fetch('cohorts', expires_in: 1.day) do - CohortsService.new.execute - end - - @cohorts = CohortsSerializer.new.represent(cohorts_results) - end - end -end diff --git a/app/controllers/admin/conversational_development_index_controller.rb b/app/controllers/admin/conversational_development_index_controller.rb deleted file mode 100644 index 921169d3e2b..00000000000 --- a/app/controllers/admin/conversational_development_index_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class Admin::ConversationalDevelopmentIndexController < Admin::ApplicationController - def show - @metric = ConversationalDevelopmentIndex::Metric.order(:created_at).last&.present - end -end diff --git a/app/controllers/instance_statistics/application_controller.rb b/app/controllers/instance_statistics/application_controller.rb new file mode 100644 index 00000000000..2077b71bf2d --- /dev/null +++ b/app/controllers/instance_statistics/application_controller.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +class InstanceStatistics::ApplicationController < ApplicationController + before_action :authenticate_user! + layout 'instance_statistics' + + def index + redirect_to instance_statistics_conversations_development_index_index_path + end + + def authenticate_user! + render_404 unless current_user.admin? + end +end diff --git a/app/controllers/instance_statistics/cohorts_controller.rb b/app/controllers/instance_statistics/cohorts_controller.rb new file mode 100644 index 00000000000..77d09c198c8 --- /dev/null +++ b/app/controllers/instance_statistics/cohorts_controller.rb @@ -0,0 +1,11 @@ +class InstanceStatistics::CohortsController < InstanceStatistics::ApplicationController + def index + if Gitlab::CurrentSettings.usage_ping_enabled + cohorts_results = Rails.cache.fetch('cohorts', expires_in: 1.day) do + CohortsService.new.execute + end + + @cohorts = CohortsSerializer.new.represent(cohorts_results) + end + end +end diff --git a/app/controllers/instance_statistics/conversational_development_index_controller.rb b/app/controllers/instance_statistics/conversational_development_index_controller.rb new file mode 100644 index 00000000000..d6d2191849f --- /dev/null +++ b/app/controllers/instance_statistics/conversational_development_index_controller.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class InstanceStatistics::ConversationalDevelopmentIndexController < InstanceStatistics::ApplicationController + def index + @metric = ConversationalDevelopmentIndex::Metric.order(:created_at).last&.present + end +end diff --git a/app/views/admin/application_settings/_usage.html.haml b/app/views/admin/application_settings/_usage.html.haml index 49a3ee33a85..40b5c51ac88 100644 --- a/app/views/admin/application_settings/_usage.html.haml +++ b/app/views/admin/application_settings/_usage.html.haml @@ -23,7 +23,7 @@ periodically collect usage information. = link_to 'Learn more', help_page_path("user/admin_area/settings/usage_statistics", anchor: "usage-ping") about what information is shared with GitLab Inc. Visit - = link_to 'Cohorts', admin_cohorts_path(anchor: 'usage-ping') + = link_to 'Cohorts', instance_statistics_cohorts_path(anchor: 'usage-ping') to see the JSON payload sent. - else The usage ping is disabled, and cannot be configured through this diff --git a/app/views/admin/cohorts/_cohorts_table.html.haml b/app/views/admin/cohorts/_cohorts_table.html.haml deleted file mode 100644 index 701a4e62b39..00000000000 --- a/app/views/admin/cohorts/_cohorts_table.html.haml +++ /dev/null @@ -1,28 +0,0 @@ -.bs-callout.clearfix - %p - User cohorts are shown for the last #{@cohorts[:months_included]} - months. Only users with activity are counted in the cohort total; inactive - users are counted separately. - = link_to icon('question-circle'), help_page_path('user/admin_area/user_cohorts', anchor: 'cohorts'), title: 'About this feature', target: '_blank' - -.table-holder - %table.table - %thead - %tr - %th Registration month - %th Inactive users - %th Cohort total - - @cohorts[:months_included].times do |i| - %th Month #{i} - %tbody - - @cohorts[:cohorts].each do |cohort| - %tr - %td= cohort[:registration_month] - %td= cohort[:inactive] - %td= cohort[:total] - - cohort[:activity_months].each do |activity_month| - %td - - next if cohort[:total] == '0' - = activity_month[:percentage] - %br - = activity_month[:total] diff --git a/app/views/admin/cohorts/_usage_ping.html.haml b/app/views/admin/cohorts/_usage_ping.html.haml deleted file mode 100644 index 3dda386fcf7..00000000000 --- a/app/views/admin/cohorts/_usage_ping.html.haml +++ /dev/null @@ -1,10 +0,0 @@ -%h2#usage-ping Usage ping - -.bs-callout.clearfix - %p - User cohorts are shown because the usage ping is enabled. The data sent with - this is shown below. To disable this, visit - = succeed '.' do - = link_to 'application settings', admin_application_settings_path(anchor: 'usage-statistics') - -%pre.usage-data.js-syntax-highlight.code.highlight{ data: { endpoint: usage_data_admin_application_settings_path(format: :html) } } diff --git a/app/views/admin/cohorts/index.html.haml b/app/views/admin/cohorts/index.html.haml deleted file mode 100644 index 5e9a8c083af..00000000000 --- a/app/views/admin/cohorts/index.html.haml +++ /dev/null @@ -1,16 +0,0 @@ -- breadcrumb_title "Cohorts" -- @no_container = true - -%div{ class: container_class } - - if @cohorts - = render 'cohorts_table' - = render 'usage_ping' - - else - .bs-callout.bs-callout-warning.clearfix - %p - User cohorts are only shown when the - = link_to 'usage ping', help_page_path('user/admin_area/settings/usage_statistics', anchor: 'usage-ping'), target: '_blank' - is enabled. To enable it and see user cohorts, - visit - = succeed '.' do - = link_to 'application settings', admin_application_settings_path(anchor: 'usage-statistics') diff --git a/app/views/admin/conversational_development_index/_callout.html.haml b/app/views/admin/conversational_development_index/_callout.html.haml deleted file mode 100644 index 33a4dab1e00..00000000000 --- a/app/views/admin/conversational_development_index/_callout.html.haml +++ /dev/null @@ -1,13 +0,0 @@ -.prepend-top-default -.user-callout{ data: { uid: 'convdev_intro_callout_dismissed' } } - .bordered-box.landing.content-block - %button.btn.btn-default.close.js-close-callout{ type: 'button', - 'aria-label' => 'Dismiss ConvDev introduction' } - = icon('times', class: 'dismiss-icon', 'aria-hidden' => 'true') - .user-callout-copy - %h4 - Introducing Your Conversational Development Index - %p - Your Conversational Development Index gives an overview of how you are using GitLab from a feature perspective. View how you compare with other organizations, discover features you are not using, and learn best practices through blog posts and white papers. - .svg-container.convdev - = custom_icon('convdev_overview') diff --git a/app/views/admin/conversational_development_index/_card.html.haml b/app/views/admin/conversational_development_index/_card.html.haml deleted file mode 100644 index 57eda06630b..00000000000 --- a/app/views/admin/conversational_development_index/_card.html.haml +++ /dev/null @@ -1,25 +0,0 @@ -.convdev-card-wrapper - .convdev-card{ class: "convdev-card-#{score_level(card.percentage_score)}" } - .convdev-card-title - %h3 - = card.title - .light-text - = card.description - .board-card-scores - .board-card-score - .board-card-score-value - = format_score(card.instance_score) - .board-card-score-name You - .board-card-score - .board-card-score-value - = format_score(card.leader_score) - .board-card-score-name Lead - .board-card-score-big - = number_to_percentage(card.percentage_score, precision: 1) - .board-card-buttons - - if card.blog - %a{ href: card.blog } - = icon('info-circle', 'aria-hidden' => 'true') - - if card.docs - %a{ href: card.docs } - = icon('question-circle', 'aria-hidden' => 'true') diff --git a/app/views/admin/conversational_development_index/_disabled.html.haml b/app/views/admin/conversational_development_index/_disabled.html.haml deleted file mode 100644 index 0a741b50960..00000000000 --- a/app/views/admin/conversational_development_index/_disabled.html.haml +++ /dev/null @@ -1,9 +0,0 @@ -.container.convdev-empty - .col-sm-12.justify-content-center.text-center - = custom_icon('convdev_no_index') - %h4 Usage ping is not enabled - %p - ConvDev is only shown when the - = link_to 'usage ping', help_page_path('user/admin_area/settings/usage_statistics'), target: '_blank' - is enabled. Enable usage ping to get an overview of how you are using GitLab from a feature perspective - = link_to 'Enable usage ping', admin_application_settings_path(anchor: 'usage-statistics'), class: 'btn btn-primary' diff --git a/app/views/admin/conversational_development_index/_no_data.html.haml b/app/views/admin/conversational_development_index/_no_data.html.haml deleted file mode 100644 index d69c46194b4..00000000000 --- a/app/views/admin/conversational_development_index/_no_data.html.haml +++ /dev/null @@ -1,7 +0,0 @@ -.container.convdev-empty - .col-sm-12.justify-content-center.text-center - = custom_icon('convdev_no_data') - %h4 Data is still calculating... - %p - In order to gather accurate feature usage data, it can take 1 to 2 weeks to see your index. - = link_to 'Learn more', help_page_path('user/admin_area/monitoring/convdev'), target: '_blank' diff --git a/app/views/admin/conversational_development_index/show.html.haml b/app/views/admin/conversational_development_index/show.html.haml deleted file mode 100644 index e3d1aa31dc2..00000000000 --- a/app/views/admin/conversational_development_index/show.html.haml +++ /dev/null @@ -1,33 +0,0 @@ -- @no_container = true -- page_title 'ConvDev Index' - -.container - - if show_callout?('convdev_intro_callout_dismissed') - = render 'callout' - - .prepend-top-default - - if !Gitlab::CurrentSettings.usage_ping_enabled - = render 'disabled' - - elsif @metric.blank? - = render 'no_data' - - else - .convdev - .convdev-header - %h2.convdev-header-title{ class: "convdev-#{score_level(@metric.average_percentage_score)}-score" } - = number_to_percentage(@metric.average_percentage_score, precision: 1) - .convdev-header-subtitle - index - %br - score - = link_to icon('question-circle', 'aria-hidden' => 'true'), help_page_path('user/admin_area/monitoring/convdev') - - .convdev-cards.board-card-container - - @metric.cards.each do |card| - = render 'card', card: card - - .convdev-steps.d-none.d-lg-block.d-xl-block - - @metric.idea_to_production_steps.each_with_index do |step, index| - .convdev-step{ class: "convdev-#{score_level(step.percentage_score)}-score" } - = custom_icon("i2p_step_#{index + 1}") - %h4.convdev-step-title - = step.title diff --git a/app/views/instance_statistics/cohorts/_cohorts_table.html.haml b/app/views/instance_statistics/cohorts/_cohorts_table.html.haml new file mode 100644 index 00000000000..701a4e62b39 --- /dev/null +++ b/app/views/instance_statistics/cohorts/_cohorts_table.html.haml @@ -0,0 +1,28 @@ +.bs-callout.clearfix + %p + User cohorts are shown for the last #{@cohorts[:months_included]} + months. Only users with activity are counted in the cohort total; inactive + users are counted separately. + = link_to icon('question-circle'), help_page_path('user/admin_area/user_cohorts', anchor: 'cohorts'), title: 'About this feature', target: '_blank' + +.table-holder + %table.table + %thead + %tr + %th Registration month + %th Inactive users + %th Cohort total + - @cohorts[:months_included].times do |i| + %th Month #{i} + %tbody + - @cohorts[:cohorts].each do |cohort| + %tr + %td= cohort[:registration_month] + %td= cohort[:inactive] + %td= cohort[:total] + - cohort[:activity_months].each do |activity_month| + %td + - next if cohort[:total] == '0' + = activity_month[:percentage] + %br + = activity_month[:total] diff --git a/app/views/instance_statistics/cohorts/_usage_ping.html.haml b/app/views/instance_statistics/cohorts/_usage_ping.html.haml new file mode 100644 index 00000000000..3dda386fcf7 --- /dev/null +++ b/app/views/instance_statistics/cohorts/_usage_ping.html.haml @@ -0,0 +1,10 @@ +%h2#usage-ping Usage ping + +.bs-callout.clearfix + %p + User cohorts are shown because the usage ping is enabled. The data sent with + this is shown below. To disable this, visit + = succeed '.' do + = link_to 'application settings', admin_application_settings_path(anchor: 'usage-statistics') + +%pre.usage-data.js-syntax-highlight.code.highlight{ data: { endpoint: usage_data_admin_application_settings_path(format: :html) } } diff --git a/app/views/instance_statistics/cohorts/index.html.haml b/app/views/instance_statistics/cohorts/index.html.haml new file mode 100644 index 00000000000..5e9a8c083af --- /dev/null +++ b/app/views/instance_statistics/cohorts/index.html.haml @@ -0,0 +1,16 @@ +- breadcrumb_title "Cohorts" +- @no_container = true + +%div{ class: container_class } + - if @cohorts + = render 'cohorts_table' + = render 'usage_ping' + - else + .bs-callout.bs-callout-warning.clearfix + %p + User cohorts are only shown when the + = link_to 'usage ping', help_page_path('user/admin_area/settings/usage_statistics', anchor: 'usage-ping'), target: '_blank' + is enabled. To enable it and see user cohorts, + visit + = succeed '.' do + = link_to 'application settings', admin_application_settings_path(anchor: 'usage-statistics') diff --git a/app/views/instance_statistics/conversational_development_index/_callout.html.haml b/app/views/instance_statistics/conversational_development_index/_callout.html.haml new file mode 100644 index 00000000000..33a4dab1e00 --- /dev/null +++ b/app/views/instance_statistics/conversational_development_index/_callout.html.haml @@ -0,0 +1,13 @@ +.prepend-top-default +.user-callout{ data: { uid: 'convdev_intro_callout_dismissed' } } + .bordered-box.landing.content-block + %button.btn.btn-default.close.js-close-callout{ type: 'button', + 'aria-label' => 'Dismiss ConvDev introduction' } + = icon('times', class: 'dismiss-icon', 'aria-hidden' => 'true') + .user-callout-copy + %h4 + Introducing Your Conversational Development Index + %p + Your Conversational Development Index gives an overview of how you are using GitLab from a feature perspective. View how you compare with other organizations, discover features you are not using, and learn best practices through blog posts and white papers. + .svg-container.convdev + = custom_icon('convdev_overview') diff --git a/app/views/instance_statistics/conversational_development_index/_card.html.haml b/app/views/instance_statistics/conversational_development_index/_card.html.haml new file mode 100644 index 00000000000..57eda06630b --- /dev/null +++ b/app/views/instance_statistics/conversational_development_index/_card.html.haml @@ -0,0 +1,25 @@ +.convdev-card-wrapper + .convdev-card{ class: "convdev-card-#{score_level(card.percentage_score)}" } + .convdev-card-title + %h3 + = card.title + .light-text + = card.description + .board-card-scores + .board-card-score + .board-card-score-value + = format_score(card.instance_score) + .board-card-score-name You + .board-card-score + .board-card-score-value + = format_score(card.leader_score) + .board-card-score-name Lead + .board-card-score-big + = number_to_percentage(card.percentage_score, precision: 1) + .board-card-buttons + - if card.blog + %a{ href: card.blog } + = icon('info-circle', 'aria-hidden' => 'true') + - if card.docs + %a{ href: card.docs } + = icon('question-circle', 'aria-hidden' => 'true') diff --git a/app/views/instance_statistics/conversational_development_index/_disabled.html.haml b/app/views/instance_statistics/conversational_development_index/_disabled.html.haml new file mode 100644 index 00000000000..0a741b50960 --- /dev/null +++ b/app/views/instance_statistics/conversational_development_index/_disabled.html.haml @@ -0,0 +1,9 @@ +.container.convdev-empty + .col-sm-12.justify-content-center.text-center + = custom_icon('convdev_no_index') + %h4 Usage ping is not enabled + %p + ConvDev is only shown when the + = link_to 'usage ping', help_page_path('user/admin_area/settings/usage_statistics'), target: '_blank' + is enabled. Enable usage ping to get an overview of how you are using GitLab from a feature perspective + = link_to 'Enable usage ping', admin_application_settings_path(anchor: 'usage-statistics'), class: 'btn btn-primary' diff --git a/app/views/instance_statistics/conversational_development_index/_no_data.html.haml b/app/views/instance_statistics/conversational_development_index/_no_data.html.haml new file mode 100644 index 00000000000..d69c46194b4 --- /dev/null +++ b/app/views/instance_statistics/conversational_development_index/_no_data.html.haml @@ -0,0 +1,7 @@ +.container.convdev-empty + .col-sm-12.justify-content-center.text-center + = custom_icon('convdev_no_data') + %h4 Data is still calculating... + %p + In order to gather accurate feature usage data, it can take 1 to 2 weeks to see your index. + = link_to 'Learn more', help_page_path('user/admin_area/monitoring/convdev'), target: '_blank' diff --git a/app/views/instance_statistics/conversational_development_index/index.html.haml b/app/views/instance_statistics/conversational_development_index/index.html.haml new file mode 100644 index 00000000000..e3d1aa31dc2 --- /dev/null +++ b/app/views/instance_statistics/conversational_development_index/index.html.haml @@ -0,0 +1,33 @@ +- @no_container = true +- page_title 'ConvDev Index' + +.container + - if show_callout?('convdev_intro_callout_dismissed') + = render 'callout' + + .prepend-top-default + - if !Gitlab::CurrentSettings.usage_ping_enabled + = render 'disabled' + - elsif @metric.blank? + = render 'no_data' + - else + .convdev + .convdev-header + %h2.convdev-header-title{ class: "convdev-#{score_level(@metric.average_percentage_score)}-score" } + = number_to_percentage(@metric.average_percentage_score, precision: 1) + .convdev-header-subtitle + index + %br + score + = link_to icon('question-circle', 'aria-hidden' => 'true'), help_page_path('user/admin_area/monitoring/convdev') + + .convdev-cards.board-card-container + - @metric.cards.each do |card| + = render 'card', card: card + + .convdev-steps.d-none.d-lg-block.d-xl-block + - @metric.idea_to_production_steps.each_with_index do |step, index| + .convdev-step{ class: "convdev-#{score_level(step.percentage_score)}-score" } + = custom_icon("i2p_step_#{index + 1}") + %h4.convdev-step-title + = step.title diff --git a/app/views/layouts/instance_statistics.html.haml b/app/views/layouts/instance_statistics.html.haml new file mode 100644 index 00000000000..af39318b2ab --- /dev/null +++ b/app/views/layouts/instance_statistics.html.haml @@ -0,0 +1,6 @@ +- page_title "Instance Statistics" +- header_title "Instance Statistics", instance_statistics_root_path +- nav "instance_statistics" +- @left_sidebar = true + += render template: "layouts/application" diff --git a/app/views/layouts/nav/sidebar/_admin.html.haml b/app/views/layouts/nav/sidebar/_admin.html.haml index 0047efa363d..302de31a6d4 100644 --- a/app/views/layouts/nav/sidebar/_admin.html.haml +++ b/app/views/layouts/nav/sidebar/_admin.html.haml @@ -48,11 +48,11 @@ %span = _('Gitaly Servers') = nav_link path: 'cohorts#index' do - = link_to admin_cohorts_path, title: _('Cohorts') do + = link_to instance_statistics_cohorts_path, title: _('Cohorts') do %span = _('Cohorts') = nav_link(controller: :conversational_development_index) do - = link_to admin_conversational_development_index_path, title: _('ConvDev Index') do + = link_to instance_statistics_conversational_development_index_index_path, title: _('ConvDev Index') do %span = _('ConvDev Index') diff --git a/app/views/layouts/nav/sidebar/_instance_statistics.html.haml b/app/views/layouts/nav/sidebar/_instance_statistics.html.haml new file mode 100644 index 00000000000..cb64c97f7b4 --- /dev/null +++ b/app/views/layouts/nav/sidebar/_instance_statistics.html.haml @@ -0,0 +1,33 @@ +.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 + .avatar-container.s40.settings-avatar + = sprite_icon('chart', size: 24) + .sidebar-context-title Instance Statistics + %ul.sidebar-top-level-items + = nav_link(controller: :conversational_development_index) do + = link_to instance_statistics_conversational_development_index_index_path do + .nav-icon-container + = sprite_icon('comment') + %span.nav-item-name + = _('ConvDev Index') + %ul.sidebar-sub-level-items.is-fly-out-only + = nav_link(controller: :conversational_development_index, html_options: { class: "fly-out-top-item" } ) do + = link_to instance_statistics_conversational_development_index_index_path do + %strong.fly-out-top-item-name + = _('ConvDev Index') + + = 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 'shared/sidebar_toggle_button' -- cgit v1.2.1