<% @invites.each do |invite| %> <% end %> <% @users.each do |user| -%> <% end -%>
Name Email Can access Last seen
<%= invite.email %> <%= invite.roles.map(&:to_s).sort.to_sentence %> <% if invite.sent_at? %> Invited <%= time_ago_in_words(invite.sent_at) %> ago <% end %> <% if current_user.role?(:users) %> <%= link_to("View invite", admin_invite_with_token_url(invite, invite.token)) %> / <%= link_to("Cancel invite", [:admin, invite], method: 'delete', data: { confirm: "Are you sure?" }, class: 'delete') %> <% end %>
<%= link_to user.name, admin_user_url( user ) %> <% if policy(user).edit? %> (<%= link_to "edit", edit_admin_user_url( user ), class: :edit %>) <% end %> <%= user.email %> <%= user.roles.map(&:to_s).sort.to_sentence %> <% if user.online? -%> Online now <% elsif user.last_login_at -%> <%= time_ago_in_words( user.last_login_at ) %> ago <% else %> Not logged in yet <% end -%> <%= notes = [] notes << "Deactivated" unless user.activated? notes.join( ", " ) %>