Sha256: 45f087ecb3c0dacb3045a45c4a43d13f02e742aa7ab729226bba9b7e3cfb0960
Contents?: true
Size: 1.82 KB
Versions: 92
Compression:
Stored size: 1.82 KB
Contents
<%= render 'spree/admin/shared/product_tabs', current: :properties %> <%= render 'spree/admin/shared/error_messages', target: @product %> <% content_for :page_actions do %> <%= button_link_to(Spree.t(:add_product_properties), "javascript:;", { icon: 'add', :'data-target' => "tbody#product_properties", class: 'btn-success spree_add_fields' }) %> <span class="js-new-ptype-link"><%= button_link_to Spree.t(:select_from_prototype), available_admin_prototypes_url, { icon: 'properties', remote: true, 'data-update' => 'prototypes', class: 'btn-default' } %></span> <% end if can? :create, Spree::ProductProperty %> <%= form_for @product, url: spree.admin_product_url(@product), method: :put do |f| %> <fieldset> <div id="prototypes" data-hook></div> <table class="table sortable" data-hook data-sortable-link="<%= update_positions_admin_product_product_properties_url %>"> <thead> <tr data-hook="product_properties_header"> <th colspan="2"><%= Spree.t(:property) %></th> <th><%= Spree.t(:value) %></th> <th class="actions"></th> </tr> </thead> <tbody id="product_properties" data-hook> <%= f.fields_for :product_properties do |pp_form| %> <%= render 'product_property_fields', f: pp_form %> <% end %> </tbody> </table> <%= render('spree/admin/shared/edit_resource_links') if can? :update, Spree::ProductProperty %> <%= hidden_field_tag 'clear_product_properties', 'true' %> </fieldset> <% end %> <%= javascript_tag do %> var properties = <%= raw(@properties.to_json) %>; $('#product_properties').on('keydown', 'input.autocomplete', function() { already_auto_completed = $(this).is('ac_input'); if (!already_auto_completed) { $(this).autocomplete({source: properties}); $(this).focus(); } }); <% end %>
Version data entries
92 entries across 92 versions & 1 rubygems