= page_title :index, User
p= paginate @users
table.ui.table.table-striped.celled
  thead
    tr
      th= at :email
      th= at :admin
      -#%th Roles
      th.actions
  tbody
    - @users.each do |user|
      tr id="user-#{user.id}"
        td= link_to user.email, [dunlop, :edit, user]
        td= boolean_show user.admin
        -#%td= user.roles
        td.actions
          - if can? :edit, user
            = table_edit_link user, [dunlop, :edit, user]
          - if can? :destroy, user
            = table_destroy_link user, [dunlop, user]
          /= link_to 'Edit', edit_admin_user_path(user), class: 'button small secondary'
          - if can? :become_user, user
            = link_to 'Become User', dunlop.become_user_user_path(user), method: :post, class: 'ui small button'
          /= link_to 'Destroy', [:admin, user], data: { confirm: 'Are you sure?' }, method: :delete, class: 'button small alert'
.page-actions
  = link_to t('action.new.label', model: User.model_name.human), dunlop.new_user_path, class: 'new ui primary button'
