Sha256: 8e091aa122c59104d1fd35e44a48ab7e4859f7890d515e13973d175b0075fe38

Contents?: true

Size: 1.92 KB

Versions: 1

Compression:

Stored size: 1.92 KB

Contents

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

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

<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @product } %>

<%= form_for @product, :url => admin_product_url(@product), :html => { :method => :put } do |f| %>
  <table class="index">
    <thead>
      <tr data-hook="product_properties_header">
        <th><%= t(:property) %></th>
        <th><%= t(:value) %></th>
        <th><%= t(:action) %></th>
      </tr>
    </thead>
    <tbody id="product_properties" data-hook>
      <%= f.fields_for :product_properties do |pp_form| %>
        <%= render :partial => 'product_property_fields', :locals => { :f => pp_form } %>
      <% end %>
    </tbody>
  </table>

  <%= hidden_field_tag 'clear_product_properties', 'true' %>

  <p class="add_product_properties" data-hook="add_product_properties">
    <%= link_to_add_fields  icon('add') + ' ' + t(:add_product_properties),
                            'tbody#product_properties',
                            f,
                            :product_properties %>

    &nbsp;&nbsp;

    <span id="new_ptype_link">
      <%= link_to t(:select_from_prototype), available_admin_prototypes_url,
                  :remote => true, 'data-update' => 'prototypes' %>
    </span>
  </p>
  <div id="prototypes" data-hook></div>
    <%= image_tag 'spinner.gif', :plugin => 'spree', :style => 'display:none;', :id => 'busy_indicator' %>
    <br />
  <%= render :partial => 'spree/admin/shared/edit_resource_links' %>
<% end %>

<%= javascript_tag do -%>
  var properties = [<%= @properties.map{|id| "'#{id}'"}.join(', ') %>];

  $("#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

1 entries across 1 versions & 1 rubygems

Version Path
spree_core-1.0.0.rc1 app/views/spree/admin/product_properties/index.html.erb