<%= page_title(t('.section'), t('.page_title')) %> <%= bootstrap_form_for Spotlight::Engine.user_class.new, url: spotlight.admin_users_path do |f| %>

<%= t :'.instructions' %>

<% @site.roles.map(&:user).each do |user| %> <% end %>
<%= Spotlight::Engine.user_class.human_attribute_name(:email) %>
<%= user.email %> <%= t('.pending') %> <%= link_to(t('.destroy'), admin_user_path(user), method: :delete, class: 'btn btn-danger pull-right') unless user == current_user %>
<%= f.email_field :email, hide_label: true %>
<%= cancel_link f.object, '#', class: 'btn btn-link', data: { behavior: 'cancel-edit' } %> <%= f.submit t('.save'), class: 'btn btn-primary'%>
<%= link_to(t('.create'), 'javascript:;', class: 'btn btn-default', data: { behavior: 'new-user' }) %>

<%= t :'.admins_curators' %>

<%= Spotlight::Engine.user_class.with_roles.pluck(:email).sort.join(', ') %>

<%= t :'.all_users' %>

<% @users.each do |user| %> <% end %>
<%= Spotlight::Engine.user_class.human_attribute_name(:email) %> <%= Spotlight::Engine.user_class.human_attribute_name(:role) %>
<%= user.email %> <%= t('.pending') %> <%= user.roles.map { |r| r.role.titleize }.uniq.join(", ") %> <% if user.superadmin? %> <%= link_to(t('.destroy'), admin_user_path(user), method: :delete, class: 'btn btn-danger pull-right') unless user == current_user %> <% else %> <%= link_to(t('.update'), admin_user_path(user), method: :patch, class: 'btn btn-default pull-right') %> <% end %>
<% end %>