<%= render :partial => 'admin/shared/product_sub_menu' %> <%= render :partial => 'admin/shared/product_tabs', :locals => {:current => "Variants"} %> <% Variant.additional_fields.select{|f| f[:only].nil? || f[:only].include?(:variant) }.each do |field| %> <% end %> <% @variants.each do |variant| %> <% next if variant.option_values.empty? %> > <% Variant.additional_fields.select{|f| f[:only].nil? || f[:only].include?(:variant) }.each do |field| %> <% end %> <% end %> <% unless @product.variants? %> <% end %>
<%= t("options") %> <%= t("price") %> <%= t("sku") %><%= field[:name].titleize %><%= t("on_hand") %> <%= t("action") %>
<%= variant_options variant %> <%= variant.price %> <%= variant.sku %><%= variant[field[:name].gsub(" ", "_").downcase] %><%= variant.on_hand %> <%= link_to_edit(variant) if variant.deleted_at.nil? %>   <%= link_to_delete(variant) if variant.deleted_at.nil? %>
<%= t("none") %>.
<% if @product.options.empty? %>

<%= t("to_add_variants_you_must_first_define") %> <%= link_to t("option_types"), selected_admin_product_option_types_url(@product) %>

<% else %>

<%= image_tag "spinner.gif", :plugin=>"spree", :style => "display:none", :id => 'busy_indicator' %> <% end %>