<commit_before>%table.table.table-striped
  %thead
    %tr
      = th_sort_field @order, 'users.last_name', 'Name'
      = th_sort_field @order, 'users.email', 'Email'
      = th_sort_field @order, 'users.current_sign_in_at', 'Recent Activity'
      = th_sort_field @order, 'users.approved', 'Approved'
      = th_sort_field @order, 'users.admin', 'Admin'
      = th_sort_field @order, 'users.editor', 'Editor'
      %th Actions

  - @users.each do |user|
    %tr
      %td
        =# image_tag user.avatar_url(18), style: 'vertical-align:text-bottom'
        = link_to user.name, admin_user_path(user)
      %td= user.email
      %td=# recent_activity(user.current_sign_in_at)
      %td.center= user.approved?
      %td.center= user.admin?
      %td.center= user.editor?
      %td
        = link_to 'Edit', edit_admin_user_path(user), class: 'btn btn-default btn-xs'
        - unless current_user == user
          = link_to 'Delete', admin_user_path(user), method: :delete, class: 'btn btn-xs btn-danger-inverse', data: { confirm: "Are you sure you want to delete User #{user.name}?" }

.center
  = paginate @users, theme: 'bootstrap'<commit_msg>Added recent activity to users index, closes #24.<commit_after>%table.table.table-striped
  %thead
    %tr
      = th_sort_field @order, 'users.last_name', 'Name'
      = th_sort_field @order, 'users.email', 'Email'
      = th_sort_field @order, 'users.current_sign_in_at', 'Recent Activity'
      = th_sort_field @order, 'users.approved', 'Approved'
      = th_sort_field @order, 'users.admin', 'Admin'
      = th_sort_field @order, 'users.editor', 'Editor'
      %th Actions

  - @users.each do |user|
    %tr
      %td
        =# image_tag user.avatar_url(18), style: 'vertical-align:text-bottom'
        = link_to user.name, admin_user_path(user)
      %td= user.email
      %td
        = time_ago_in_words user.current_sign_in_at
        ago
      %td.center= user.approved?
      %td.center= user.admin?
      %td.center= user.editor?
      %td
        = link_to 'Edit', edit_admin_user_path(user), class: 'btn btn-default btn-xs'
        - unless current_user == user
          = link_to 'Delete', admin_user_path(user), method: :delete, class: 'btn btn-xs btn-danger-inverse', data: { confirm: "Are you sure you want to delete User #{user.name}?" }

.center
  = paginate @users, theme: 'bootstrap'
{'fraction_non_alphanumeric': 0.13854653633659159, 'fraction_numerical': 0.0025499362515937103, 'mean_word_length': 3.0586206896551724, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5816000', 'n_tokens_mistral': 824, 'n_tokens_neox': 802, 'n_words': 184}