Sha256: 054b83e82b54f114c7f1398346edfb6262d458d138eaedcdb20797fcf1995aab

Contents?: true

Size: 1.87 KB

Versions: 7

Compression:

Stored size: 1.87 KB

Contents

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

<h1><%= t(:editing_product_group) %></h1>

<fieldset id="product_group_forms_container" data-hook>

  <%= form_for [:admin, @product_group], :html => { :id => 'product-group-form', :method => :put } do |f| %>

      <%= f.field_container :name do %>
        <%= f.label :name, t(:name) %><br />
        <%= f.text_field :name %>
        <%= f.error_message_on :name %>
      <% end %>

      <%= f.field_container :permalink do %>
        <%= f.label :permalink, t(:permalink) %><br />
        <%= f.text_field :permalink %>
        <%= f.error_message_on :permalink %>
      <% end %>

      <%= f.field_container :order_scope do %>
        <%= f.label :order_scope, t(:sort_ordering) %><br />
        <%= f.select(:order_scope, Spree::Product.simple_scopes.collect{|p| [ t(:name, :scope =>[:product_scopes, :scopes, p]), p.to_s ] }) %>
      <% end %>

      <table id="product_scopes" data-hook>
        <%= render :partial => 'product_scope', :collection => @product_group.product_scopes.reject {|s| s.is_ordering? } %>
      </table>

    <%= button t(:update) %>

  <% end %>

  <%= form_tag admin_product_group_product_scopes_path(@product_group), :remote => true, :id => 'new_product_group_form' do %>
    <%
    options =
    grouped_options_for_select(
    Spree::ProductScope.all_scopes.map do |group_name, scopes|
      [
        t(:name, :scope => [:product_scopes, :groups, group_name]),
        scopes.keys.map do |scope_name|
          [ t(:name, :scope => [:product_scopes, :scopes, scope_name]), scope_name]
        end
      ]
    end
    )
    %>
    <p>
      <%= label_tag :product_scope_name, t(:add_scope) %>
      <%= select_tag 'product_scope[name]', options %>
      <%= submit_tag t(:add) %>
    </p>
  <% end %>

</fieldset>

<fieldset id="preview_container" data-hook>
  <%= render :partial => 'preview' %>
</fieldset>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
spree_core-1.0.7 app/views/spree/admin/product_groups/edit.html.erb
spree_core-1.0.6 app/views/spree/admin/product_groups/edit.html.erb
spree_core-1.0.4 app/views/spree/admin/product_groups/edit.html.erb
spree_core-1.0.3 app/views/spree/admin/product_groups/edit.html.erb
spree_core-1.0.2 app/views/spree/admin/product_groups/edit.html.erb
spree_core-1.0.1 app/views/spree/admin/product_groups/edit.html.erb
spree_core-1.0.0 app/views/spree/admin/product_groups/edit.html.erb