<% admin_layout "full-width" %> <% admin_breadcrumb(plural_resource_name(Spree::Product)) %> <% content_for :page_actions do %> <% end if can?(:create, Spree::Product) %> <% content_for :table_filter_title do %> <%= Spree.t(:search) %> <% end %> <% content_for :table_filter do %>
<%= search_form_for [:admin, @search] do |f| %> <%- locals = {f: f} %>
<%= f.label :name_cont, Spree::Product.human_attribute_name(:name) %> <%= f.text_field :name_cont, size: 15 %>
<%= f.label :with_variant_sku_cont, Spree::Variant.human_attribute_name(:sku) %> <%= f.text_field :with_variant_sku_cont, size: 15 %>
<%= button Spree.t(:search) %>
<% end %>
<% end %>
<%= paginate @collection, theme: "solidus_admin" %> <% if @collection.any? %> <% @collection.each do |product| %> id="<%= spree_dom_id product %>" data-hook="admin_products_index_rows"> <% end %>
<%= Spree::Variant.human_attribute_name(:sku) %> <%= sort_link @search,:name, Spree::Product.human_attribute_name(:name), { default_order: "desc" }, {title: 'admin_products_listing_name_title'} %> <%= sort_link @search,:master_default_price_amount, Spree::Product.human_attribute_name(:price), {}, {title: 'admin_products_listing_price_title'} %>
<%= product.sku %> <%= render 'spree/admin/shared/image', image: product.display_image, size: :mini %> <%= link_to product.try(:name), edit_admin_product_path(product) %> <%= product.display_price.to_html %> <%= link_to_edit product, no_text: true, class: 'edit' if can?(:edit, product) && !product.deleted? %>   <%= link_to_clone product, no_text: true, class: 'clone' if can?(:clone, product) %>   <%= link_to_delete product, no_text: true if can?(:delete, product) && !product.deleted? %>
<% else %>
<%= render 'spree/admin/shared/no_objects_found', resource: Spree::Product, new_resource_url: new_object_url %>
<% end %> <%= paginate @collection, theme: "solidus_admin" %>