%== erb :'admin/_nav', layout: false %>
<% if can?('users', 'write') %>+ New user ยท <% end %>audit log
<%= @link['kind'] == 'invite' ? 'Invite' : 'Password reset' %> link<%= @link['sent'] ? " emailed to #{@link['to']}" : (@link['to'] ? " โ email to #{@link['to']} FAILED, send it yourself" : ' (no email on file โ send it yourself)') %>. Shown once; it works once and expires in <%= @link['kind'] == 'invite' ? '48 hours' : '1 hour' %>:
<%= @link['url'] %>
| User | Access | Status | Last login | |
|---|---|---|---|---|
| <%= u.username %><% if u.name.to_s != '' %> <%= u.name %><% end %><% if u.email %> <%= u.email %><% end %> |
<%= perm_summary(u) %> |
<% if !u.active %>disabled
<% elsif !u.password_digest %>invited<% if u.choose_username %> picks own username<% end %> <% else %>active<% end %> |
<%= u.last_login_at&.strftime('%Y-%m-%d %H:%M') || 'โ' %> | <%= can?('users', 'write') ? 'edit' : 'view' %> |