summaryrefslogtreecommitdiff
path: root/app/views/instance_statistics/cohorts
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/instance_statistics/cohorts')
-rw-r--r--app/views/instance_statistics/cohorts/_cohorts_table.html.haml35
-rw-r--r--app/views/instance_statistics/cohorts/index.html.haml15
2 files changed, 0 insertions, 50 deletions
diff --git a/app/views/instance_statistics/cohorts/_cohorts_table.html.haml b/app/views/instance_statistics/cohorts/_cohorts_table.html.haml
deleted file mode 100644
index d4defd3f849..00000000000
--- a/app/views/instance_statistics/cohorts/_cohorts_table.html.haml
+++ /dev/null
@@ -1,35 +0,0 @@
-- number_of_data_columns = @cohorts[:months_included] - 1
-.bs-callout.clearfix
- %p
- = s_("Cohorts|User cohorts are shown for the last %{months_included} months. Only users with activity are counted in the 'New users' column; inactive users are counted separately.") % { months_included: @cohorts[:months_included] }
- = link_to icon('question-circle'), help_page_path('user/instance_statistics/user_cohorts', anchor: 'cohorts'), title: 'About this feature', target: '_blank'
-
-.table-holder.d-xl-table
- %table.table
- %thead
- %tr
- %th.border-right.pt-4{ colspan: 3 }
- %th.font-weight-bold.pt-4{ colspan: number_of_data_columns }
- = s_("Cohorts|Returning users")
- %tr
- %th.border-top-0
- = s_("Cohorts|Registration month")
- %th.border-top-0
- = s_("Cohorts|Inactive users")
- %th.border-top-0.border-right
- = s_("Cohorts|New users")
- - number_of_data_columns.times do |i|
- %th.border-top-0
- = s_("Cohorts|Month %{month_index}") % { month_index: i + 1 }
- %tbody
- - @cohorts[:cohorts].each do |cohort|
- %tr
- %td= cohort[:registration_month]
- %td= cohort[:inactive]
- %td.border-right= 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/index.html.haml b/app/views/instance_statistics/cohorts/index.html.haml
deleted file mode 100644
index a038246bd53..00000000000
--- a/app/views/instance_statistics/cohorts/index.html.haml
+++ /dev/null
@@ -1,15 +0,0 @@
-- breadcrumb_title _("Cohorts")
-- page_title _("Cohorts")
-
-- if @cohorts
- = render 'cohorts_table'
-- else
- .bs-callout.bs-callout-warning.clearfix
- %p
- - usage_ping_path = help_page_path('development/telemetry/usage_ping')
- - usage_ping_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: usage_ping_path }
- = s_('User Cohorts are only shown when the %{usage_ping_link_start}usage ping%{usage_ping_link_end} is enabled.').html_safe % { usage_ping_link_start: usage_ping_link_start, usage_ping_link_end: '</a>'.html_safe }
- - if current_user.admin?
- - application_settings_path = metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings')
- - application_settings_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: application_settings_path }
- = s_('To enable it and see User Cohorts, visit %{application_settings_link_start}application settings%{application_settings_link_end}.').html_safe % { application_settings_link_start: application_settings_link_start, application_settings_link_end: '</a>'.html_safe }