Sha256: ad6b1b26de3b66fd31245694412edbfcaa2cc5c51037f731da0edd12b842bad1

Contents?: true

Size: 1.3 KB

Versions: 35

Compression:

Stored size: 1.3 KB

Contents

<div class="card-header">
  <h1 class="card-title mb-0 h5">
    <%= Spree.t(:promotion_actions) %>
  </h1>
</div>
<div id="action_fields" class="card-body">
  <%= form_tag spree.admin_promotion_promotion_actions_path(@promotion), remote: true, id: 'new_promotion_action_form', class: 'mb-3' do %>
    <% options = options_for_select(  Rails.application.config.spree.promotions.actions.map(&:name).map {|name| [ Spree.t("promotion_action_types.#{name.demodulize.underscore}.name"), name] } ) %>

    <div class="form-group">
      <%= label_tag :action_type, Spree.t(:add_action_of_type)%>
      <%= select_tag 'action_type', options, class: 'select2' %>
    </div>
    <div class="form-actions">
      <%= button Spree.t(:add), 'plus', 'submit', class: "btn-success" %>
    </div>

  <% end %>

  <%= form_for @promotion, url: spree.admin_promotion_path(@promotion), method: :put do |f| %>
    <div id="actions" class="filter_list margint">
      <% if @promotion.actions.any? %>
        <%= render partial: 'promotion_action',  collection: @promotion.actions %>
      <% else %>
        <div class="alert alert-warning">
          <%= Spree.t(:no_actions_added) %>
        </div>
      <% end %>
    </div>
    <div class="actions promotion-update">
      <%= button Spree.t('actions.update'), 'save' %>
    </div>
  <% end %>

</div>

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
spree_backend-4.0.9 app/views/spree/admin/promotions/_actions.html.erb
spree_backend-4.1.15 app/views/spree/admin/promotions/_actions.html.erb
spree_backend-4.1.14 app/views/spree/admin/promotions/_actions.html.erb
spree_backend-4.0.8 app/views/spree/admin/promotions/_actions.html.erb
spree_backend-4.1.13.1 app/views/spree/admin/promotions/_actions.html.erb
spree_backend-4.0.7.1 app/views/spree/admin/promotions/_actions.html.erb
spree_backend-4.0.7 app/views/spree/admin/promotions/_actions.html.erb
spree_backend-4.1.13 app/views/spree/admin/promotions/_actions.html.erb
spree_backend-4.0.6 app/views/spree/admin/promotions/_actions.html.erb
spree_backend-4.0.5 app/views/spree/admin/promotions/_actions.html.erb
spree_backend-4.1.12 app/views/spree/admin/promotions/_actions.html.erb
spree_backend-4.0.4 app/views/spree/admin/promotions/_actions.html.erb
spree_backend-4.1.11 app/views/spree/admin/promotions/_actions.html.erb
spree_backend-4.1.10 app/views/spree/admin/promotions/_actions.html.erb
spree_backend-4.1.9 app/views/spree/admin/promotions/_actions.html.erb
spree_backend-4.1.8 app/views/spree/admin/promotions/_actions.html.erb
spree_backend-4.1.7 app/views/spree/admin/promotions/_actions.html.erb
spree_backend-4.1.6 app/views/spree/admin/promotions/_actions.html.erb
spree_backend-4.1.5 app/views/spree/admin/promotions/_actions.html.erb
spree_backend-4.1.4 app/views/spree/admin/promotions/_actions.html.erb