% content_for :page_actions do %>
<%= button_link_to Spree.t(:add_volume_price), 'javascript:;', {
icon: 'add', :'data-target' => 'tbody#volume_prices', class: 'btn-success spree_add_fields', id: 'add_volume_price' } %>
<% end %>
<%= Spree.t(:volume_prices) %>
<%= Spree.t(:name) %> |
<%= Spree.t(:discount_type) %> |
<%= Spree.t(:range) %> |
<%= Spree.t(:amount) %> |
<%= Spree.t(:position) %> |
<%= Spree.t(:role) %> |
<%= Spree.t(:action) %> |
<%= f.fields_for :volume_prices do |vp_form| %>
<%= render partial: 'spree/admin/volume_prices/volume_price_fields', locals: { f: vp_form } %>
<% end %>
<%= f.field_container :volume_price_model, class: ['form-group'] do %>
<%= f.label :volume_price_model_id, Spree.t(:volume_price_model) %>
<%= f.collection_select(:volume_price_model_ids, Spree::VolumePriceModel.all, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2', disabled: (cannot? :edit, Spree::VolumePriceModel) }) %>
<%= f.error_message_on :volume_price_model %>
<% end %>