Sha256: 72e269724f0b1e181810f59044cb0e50adfb45f886fa155fcbe02e3786b4269e
Contents?: true
Size: 1.83 KB
Versions: 1
Compression:
Stored size: 1.83 KB
Contents
<h2>Variants</h2> <%=error_message_on :product, :variants %> <table class="basic-table"> <thead> <tr> <th>Options</th> <th>Price</th> <th>SKU</th> <th>On Hand</th> <th>Action</th> </tr> </thead> <tbody> <% if @product.variants? %> <% @product.variants.each do |@variant| %> <% next if @variant.option_values.empty? %> <tr> <td><%= variant_options @variant %></td> <td><%= @variant.price %> <td> <%= text_field :variant, :sku, :index => @variant.id, :class => :sku %> </td> <td><%= on_hand(@variant) %></td> <td> <%= link_to "Inventory", :controller => 'inventory_units', :action => 'adjust', :id => @variant %> <%= link_to_remote "Remove", :url => {:action => 'delete_variant', :id=> @product, :variant_id => @variant}, :before => "Element.show('busy_indicator')", :complete => "Element.hide('busy_indicator')", :update => 'variant-listing' %> </td> </tr> <% end %> <% else %> <tr> <td colspan="3">None Available.</td> </tr> <% end %> </tbody> </table> <% unless @product.new_record? or @product.selected_options.empty? %> <span id="new-var-link"> <%= link_to_remote "New Product Variant", :url => {:controller => 'products', :action => 'new_variant', :id=> @product}, :before => "Element.hide('new-var-link');Element.show('var_busy_indicator')", :complete => "Element.hide('var_busy_indicator')", :update => 'new-variant' %> </span> <%= image_tag "spinner.gif", :plugin=>"spree", :style => "display:none", :id => 'var_busy_indicator' %> <% end %> <div id="new-variant"></div>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spree-0.2.0 | app/views/admin/products/_variants.rhtml |