extinctionrebellion/RebelsManager

View on GitHub
app/views/users/index.html.slim

Summary

Maintainability
Test Coverage
- content_for :page_header do
  = render 'layouts/components/page_header',
           title: 'Users',
           count: @users.size,
           links: [ \
             link_to( \
               "Add User",
               new_user_path,
               class: "primary button show-for-large" \
             ) \
           ]

table
  thead
    tr
      th Email
      th Local Group
      th Sign In Count
      th Signed In
  tbody
    - @users.each do |user|
      tr
        td
          => link_to user.email,
                    user_path(user)
          - if user.admin?
            span.label ADMIN
        td
          - if user.local_group
            = link_to user.local_group.name,
                      local_group_path(user.local_group)
          - else
            | -
        td
          = user.sign_in_count
        td
          - if user.current_sign_in_at
            = l(user.current_sign_in_at, format: :long)
          - else
            | -