% content_for :title, "Users" -%>
Username | State | Active agents | Deactivated agents | Registered since | Options | |
---|---|---|---|---|---|---|
<%= link_to user.username, edit_admin_user_path(user) %> | <%= user.email %> | <%= user_account_state(user) %> | <%= link_to user.agents.active.count, switch_to_user_admin_user_path(user), data: { confirm: 'This will log you in as another user. Would you like to continue?' } %> | <%= link_to user.agents.inactive.count, switch_to_user_admin_user_path(user), data: { confirm: 'This will log you in as another user. Would you like to continue?' } %> | <%= time_ago_in_words user.created_at %> ago |
<% if user != current_user %>
<% if user.active? %>
<%= link_to 'Become User', switch_to_user_admin_user_path(user), class: "btn btn-default", data: { confirm: 'This will log you in as another user. Would you like to continue?' } %>
<%= link_to 'Deactivate', deactivate_admin_user_path(user), method: :put, class: "btn btn-default" %>
<% else %>
<%= link_to 'Activate', activate_admin_user_path(user), method: :put, class: "btn btn-default" %>
<% end %>
<%= link_to 'Delete', admin_user_path(user), method: :delete, data: { confirm: 'Are you sure? This can not be undone.' }, class: "btn btn-default" %>
<% end %>
|