% content_for :page_title do %>
<%= Spree.t(:users) %>
<% end %>
<% content_for :page_actions do %>
<%= button_link_to Spree.t(:new_user), new_admin_user_url, class: "btn-success", icon: 'add.svg', id: 'admin_new_user_link' %>
<% end if can? :create, Spree::user_class %>
<% content_for :table_filter_title do %>
<%= Spree.t(:search) %>
<% end %>
<% content_for :table_filter do %>
<%= search_form_for [:admin, @search], url: spree.admin_users_url do |f| %>
<%= f.label :email_cont, Spree.t(:email) %>
<%= f.text_field :email_cont, class: "form-control js-quick-search-target js-filterable" %>
<%= f.label :bill_address_firstname_cont, Spree.t(:first_name) %>
<%= f.text_field :bill_address_firstname_cont, class: 'form-control js-filterable' %>
<%= f.label :bill_address_lastname_cont, Spree.t(:last_name) %>
<%= f.text_field :bill_address_lastname_cont, class: 'form-control js-filterable' %>
<% if Spree::Config[:company] %>
<%= f.label :bill_address_company_cont, Spree.t(:company) %>
<%= f.text_field :bill_address_company_cont, class: 'form-control js-filterable' %>
<% end %>
<%= button Spree.t(:search), 'search.svg' %>
<% end %>
<% end %>
<% if @users.any? %>
<%= sort_link @search,:email, Spree.t(:user), {}, {title: 'users_email_title'} %>
|
|
<% @users.each do |user| %>
<%= link_to user.email, edit_admin_user_url(user) %> |
<%= link_to_edit user, no_text: true if can?(:edit, user) %>
<%= link_to_delete user, no_text: true if can?(:delete, user) %>
|
<% end %>
<% else %>
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree.user_class)) %>,
<%= link_to Spree.t(:add_one), new_object_url %>!
<% end %>
<%= paginate @users, theme: 'admin-twitter-bootstrap-4' %>