debian-mirror-gitlab/app/views/admin/users/_cohorts_table.html.haml

36 lines
1.4 KiB
Text
Raw Normal View History

2020-01-01 13:55:28 +05:30
- number_of_data_columns = @cohorts[:months_included] - 1
2017-08-17 22:00:37 +05:30
.bs-callout.clearfix
%p
2020-01-01 13:55:28 +05:30
= 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] }
2020-11-24 15:15:51 +05:30
= link_to sprite_icon('question-o'), help_page_path('user/admin_area/analytics/user_cohorts', anchor: 'cohorts'), title: 'About this feature', target: '_blank'
2017-08-17 22:00:37 +05:30
2020-01-01 13:55:28 +05:30
.table-holder.d-xl-table
2017-08-17 22:00:37 +05:30
%table.table
%thead
%tr
2020-01-01 13:55:28 +05:30
%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 }
2017-08-17 22:00:37 +05:30
%tbody
- @cohorts[:cohorts].each do |cohort|
%tr
%td= cohort[:registration_month]
%td= cohort[:inactive]
2020-01-01 13:55:28 +05:30
%td.border-right= cohort[:total]
2017-08-17 22:00:37 +05:30
- cohort[:activity_months].each do |activity_month|
%td
- next if cohort[:total] == '0'
= activity_month[:percentage]
%br
= activity_month[:total]