Sha256: 82b9d08a9babb3ce318db0bd0ffddc793d74cc9de952fc87edae3803ef82aea2

Contents?: true

Size: 1.19 KB

Versions: 7

Compression:

Stored size: 1.19 KB

Contents

<div class="yui-gb">
  <div class="yui-u first">

    <% @product.options.each do |option| %>
      <p>
        <%= label :new_variant, option.option_type.presentation %><br />
        <% if @variant.new_record? %>
          <%= select(:new_variant, option.option_type.presentation, 
            option.option_type.option_values.collect {|ov| [ ov.presentation, ov.id ] },
            {}) 
          %>
        <% else %>
          <% opt = @variant.option_values.detect {|o| o.option_type == option.option_type }.presentation %>
          <%= text_field(:new_variant,  option.option_type.presentation, :value => opt, :disabled => 'disabled') %>
        <% end %>
      </p>
    <% end %>

    <p><%= f.label :sku, t("sku") %><br />
    <%= f.text_field :sku %></p>


    <p><%= f.label :price, t("price") %>:<br />
    <%= f.text_field :price %></p>


    <p><%= f.label :on_hand, t("on_hand") %>: <br />
    <%= f.text_field :on_hand %></p>



  </div>
  <div class="yui-u">

    <% Variant.additional_fields.select{|f| f[:only].nil? || f[:only].include?(:variant) }.each do |field| %>
      <%= render :partial => "admin/shared/additional_field", :locals => {:field => field, :f => f} %>
    <% end %>

  </div>
</div>

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
kdmny-spree-0.0.1 app/views/admin/variants/_form.html.erb
spree-0.8.4 app/views/admin/variants/_form.html.erb
spree-0.8.5 app/views/admin/variants/_form.html.erb
spree-0.8.0 app/views/admin/variants/_form.html.erb
spree-0.8.1 app/views/admin/variants/_form.html.erb
spree-0.8.2 app/views/admin/variants/_form.html.erb
spree-0.8.3 app/views/admin/variants/_form.html.erb