<%= t(:promotion_actions) %> <%= form_for @promotion, :url => spree.admin_promotion_path(@promotion), :html => { :method => :put } do |f| %>
<% if @promotion.actions.any? %> <%#= render :partial => 'promotion_action', :collection => @promotion.actions, :locals => {:f => f} %> <%= f.fields_for :promotion_actions do |action_form| %> <%= render :partial => 'spree/admin/promotions/promotion_action', :locals => { :action_form => action_form } %> <% end %> <% else %> <% end %>

<%= button t(:update) %>

<% end %> <%= form_tag spree.admin_promotion_promotion_actions_path(@promotion), :remote => true, :id => 'new_promotion_action_form' do %> <% options = options_for_select( Rails.application.config.spree.promotions.actions.map(&:name).map {|name| [ t("promotion_action_types.#{name.demodulize.underscore}.name"), name] } ) %>

<%= label_tag :action_type, t(:add_action_of_type) %> <%= select_tag 'action_type', options %> <%= submit_tag t(:add) %>

<% end %>