_cohorts_table.html.haml 968 字节
Newer Older
1 2
.bs-callout.clearfix
  %p
3 4 5
    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.
S
Sean McGivern 已提交
6
    = link_to icon('question-circle'), help_page_path('user/admin_area/user_cohorts', anchor: 'cohorts'), title: 'About this feature', target: '_blank'
7 8 9 10 11 12 13 14

.table-holder
  %table.table
    %thead
      %tr
        %th Registration month
        %th Inactive users
        %th Cohort total
15 16
        - @cohorts[:months_included].times do |i|
          %th Month #{i}
17
    %tbody
18
      - @cohorts[:cohorts].each do |cohort|
19
        %tr
20 21 22 23
          %td= cohort[:registration_month]
          %td= cohort[:inactive]
          %td= cohort[:total]
          - cohort[:activity_months].each do |activity_month|
24
            %td
25 26
              - next if cohort[:total] == '0'
              = activity_month[:percentage]
27
              %br
28
              = activity_month[:total]