Sha256: fdd242db60e20fabe2e676df4e905c12316d73ebaa741eaedf5c35ffe1306194

Contents?: true

Size: 1.95 KB

Versions: 9

Compression:

Stored size: 1.95 KB

Contents

<%= render :partial => 'admin/shared/product_sub_menu' %>

<%= render :partial => 'admin/shared/product_tabs', :locals => {:current => "Product Properties"} %>

<%= error_messages_for :product %>

<% form_for(:product, :url => admin_product_url(@product), :html => { :method => :put }) do |f| %>
  <table class="index">
    <thead>
      <tr>
        <th><%= t("property") %></th>
        <th><%= t("value") %></th>
        <th><%= t("action") %></th>
      </tr>
    </thead>
    <tbody id="product_properties">
  		<%= f.render_associated_form(@product.product_properties) %>
  		<tr id="none">
  		  <td colspan="3"><%= @product.product_properties.empty? ? "#{t("none")}." : "" %></td>
  		</tr>
  	</tbody>
  </table>

  <input type="hidden" name="clear_product_properties" value="true">

  <p>
    <%= f.add_associated_link(icon('add') + ' ' + t("add_product_properties"),
                              @product.product_properties.build, 
                              {:onclick => "jQuery('#none').hide();", :class => 'iconlink'}) %>
    &nbsp;&nbsp;
  	<span id="new_ptype_link">
  	  <%= link_to_remote t("select_from_prototype"), 
  	                     :url => available_admin_prototypes_url, 
  	                     :method => :get,
  	                     :update => "prototypes" %>
  	</span>
	</p>
	<div id="prototypes"></div>
	<%= image_tag "spinner.gif", :plugin=>"spree", :style => "display:none", :id => 'busy_indicator' %>
	<br/>
  <%= render :partial => 'admin/shared/edit_resource_links' %>
<% end %>

<% javascript_tag do %>
  var properties = "<%=@properties%>".split(' ');
  $("a.product_property_remove_link").live("click", function(){
    jQuery(this).parents('.product_property').remove();  
    return false;
  });

  $("#product_properties input.autocomplete").live("keydown", function(){
    already_auto_completed = $(this).is('ac_input');
    if (!already_auto_completed) { 
      $(this).autocomplete(properties); 
      $(this).focus();
    }
  });
<% end -%>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
spree-0.11.4 vendor/extensions/theme_default/app/views/admin/product_properties/index.html.erb
spree-0.11.3 vendor/extensions/theme_default/app/views/admin/product_properties/index.html.erb
spree-0.11.2 vendor/extensions/theme_default/app/views/admin/product_properties/index.html.erb
spree-0.11.1 vendor/extensions/theme_default/app/views/admin/product_properties/index.html.erb
spree-0.11.0 vendor/extensions/theme_default/app/views/admin/product_properties/index.html.erb
spree-0.10.2 vendor/extensions/theme_default/app/views/admin/product_properties/index.html.erb
spree-0.10.1 vendor/extensions/theme_default/app/views/admin/product_properties/index.html.erb
spree-0.10.0 vendor/extensions/theme_default/app/views/admin/product_properties/index.html.erb
spree-0.10.0.beta vendor/extensions/theme_default/app/views/admin/product_properties/index.html.erb