<%= render :partial => 'spree/admin/shared/product_sub_menu' %> <%= render :partial => 'spree/admin/shared/product_tabs', :locals => {:current => 'Variants'} %> <% Spree::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? %> data-hook="variants_row"> <% Spree::Variant.additional_fields.select { |f| f[:only].nil? || f[:only].include?(:variant) }.each do |field| %> <% end %> <% end %> <% unless @product.has_variants? %> <% end %>
<%= t(:options) %> <%= t(:price) %> <%= t(:sku) %><%= t('activerecord.attributes.spree/variant.' + field[:name].downcase, :default => field[:name].titleize) %><%= t(:on_hand) %> <%= t(:action) %>
<%= variant.options_text %> <%= number_to_currency variant.price %> <%= variant.sku %><%= variant[field[:name].gsub(" ", "_").downcase] %><%= variant.on_hand %> <%= link_to_edit(variant) unless variant.deleted? %>   <%= link_to_delete(variant) unless variant.deleted? %>
<%= t(:none) %>
<% if @product.empty_option_values? %>

<%= t(:to_add_variants_you_must_first_define) %> <%= link_to t(:option_types), selected_admin_product_option_types_url(@product) %> <%= t(:and) %> <%= link_to t(:option_values), admin_option_types_url %>

<% else %>

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