<% title _('User accounts') %>

<div class="row">
  <div class="col-md-12">
    <h1><%= _('User accounts') %></h1>
  </div>
</div>

<div class="row">
  <div class="col-md-12 ">
    <p class="text-justify">
      <%= _('Below is a list of users registered for your organisation. You can
        sort the data by each field.')%>
    </p>
  </div>
</div>

<div class="row">
  <div class="col-md-12">
    <%- # Only display Download Csv button for non super-admin users -%>
    <% if !current_user.can_super_admin? %>
      <%= button_to _('Download users'), admin_index_users_path(format: 'csv'), class: 'btn btn-default pull-right', method: 'get' %>
    <% end %>
    <div class="table-responsive">
      <%= paginable_renderise(
        partial: '/paginable/users/index',
        controller: 'paginable/users',
        action: 'index',
        scope: @users,
        view_all: !current_user.can_super_admin?) %>
    </div>
  </div>
</div>
