Sha256: c8bcad68c0c20fed70ead07247bfec120f1ea76030e84d799d05f1611f1238c7

Contents?: true

Size: 1.37 KB

Versions: 1

Compression:

Stored size: 1.37 KB

Contents

<h2>Variations</h2>
<%=error_message_on :product, :variations %>
<table class="basic-table">
	<thead>
		<tr>
			<th>Options</th>
			<th>Action</th>
		</tr>
	</thead>
	<tbody>
		<% @product.variations.each do |v| %>
			<tr>
				<td><%= variation_options v %></td>
				<td>
				  <%= link_to_remote "Remove",
				                     :url => {:action => 'delete_variation', :id=> @product, :variation_id => v},
				                     :before => "Element.show('busy_indicator')", 
				                     :complete => "Element.hide('busy_indicator')",
				                     :update => 'variation-listing' %>
				</td>
			</tr>
		<% end %>
		<% if @product.variations.empty? %>
			<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 Variation",
	                     :url => {:controller => 'products', :action => 'new_variation', :id=> @product},
	                     :before => "Element.hide('new-var-link');Element.show('var_busy_indicator')", 
	                     :complete => "Element.hide('var_busy_indicator')",
	                     :update => 'new-variation' %>
  </span>
	<%= image_tag "spinner.gif", :plugin=>"railscart", :style => "display:none", :id => 'var_busy_indicator' %>
<% end %>

<div id="new-variation"></div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
railscart-0.0.4 starter_app/vendor/plugins/railscart/app/views/admin/products/_variations.rhtml