<%# Updated icon %> <% content_for :page_actions do %> <%= button_link_to Spree.t('new_supplier'), new_object_url, icon: 'add', class: 'btn-success' %> <% end %> <% content_for :page_title do %> <%= Spree.t(:listing_suppliers) %> <% end %> <% content_for :table_filter_title do %> <%= Spree.t(:search) %> <% end %> <% content_for :table_filter do %>
<%= search_form_for [:admin, @search] do |f| %>
<%= f.label :name_cont, Spree.t(:name) %> <%= f.text_field :name_cont, :size => 15, class: "form-control" %>
<%= button Spree.t(:search), 'search' %>
<% end %>
<% end %> <%# This is a new paginate! %> <%= render :partial => 'spree/admin/shared/index_table_options', :locals => { :collection => @collection } %> <% if @collection.any? %> <%# Updated classes! %> <%- @collection.each do |supplier| %> id="<%= spree_dom_id supplier %>" data-hook="admin_suppliers_index_rows" class="<%= cycle('odd', 'even') %>"> <% end %>
<%= sort_link @search, :name, Spree::Supplier.human_attribute_name(:name) %> <%= sort_link @search, :email, Spree::Supplier.human_attribute_name(:email) %> <%= Spree.t(:users) %> <%= sort_link @search, :active, Spree::Supplier.human_attribute_name(:active) %>
<%= link_to supplier.name, edit_object_url(supplier) %> <%= mail_to supplier.email %> <%= supplier.users.pluck(:email).join(', ') %> <%= supplier.active %> <% unless supplier.deleted? %> <%= link_to_edit supplier, :no_text => true, :class => 'edit' %> <%= link_to_delete supplier, :no_text => true %> <% end %>
<% else %> <%# New alert with link to add new supplier %>
<%= Spree.t(:no_resource_found, resource: Spree::Supplier.model_name.human(count: :many)) %>, <%= link_to Spree.t(:add_one), spree.new_admin_supplier_path %>!
<% end %> <%# This is a new paginate! %> <%= render :partial => 'spree/admin/shared/index_table_options', :locals => { :collection => @collection } %>