Sha256: 5ec5662747196191cf475369584b8bd8809fae2858f9539d3bde6db3e3cb191c

Contents?: true

Size: 1.49 KB

Versions: 29

Compression:

Stored size: 1.49 KB

Contents

<fieldset id="action_fields" class="no-border-top">

  <%= 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 {|action| [ action.model_name.human, action.name] } ) %>
    <fieldset>
      <legend align="center"><%= t('spree.promotion_actions') %></legend>
      <% if can?(:update, @promotion) %>
        <div class="field">
          <%= label_tag :action_type, t('spree.adjustment_type')%>
          <%= select_tag 'action_type', options, include_blank: t(:choose_promotion_action, scope: 'spree'), class: 'custom-select fullwidth' %>
        </div>
        <div class="filter-actions actions">
          <%= button_tag t('spree.actions.add'), class: 'btn btn-primary' %>
        </div>
      <% end %>
    </fieldset>
  <% end %>

  <%= form_for @promotion, url: spree.admin_promotion_path(@promotion), method: :put do |f| %>
    <div id="actions" class="filter_list">
      <% if @promotion.actions.any? %>
        <%= render partial: 'promotion_action',  collection: @promotion.actions %>
      <% else %>
        <div class="no-objects-found">
          <%= t('spree.no_actions_added') %>
        </div>
      <% end %>
    </div>
    <% if can?(:update, @promotion) %>
      <div class="filter-actions actions promotion-update">
        <%= button_tag t('spree.actions.update'), class: 'btn btn-primary' %>
      </div>
    <% end %>
  <% end %>

</fieldset>

Version data entries

29 entries across 29 versions & 2 rubygems

Version Path
solidus_backend-2.9.6 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.8.6 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.9.5 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.9.4 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.8.5 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.9.3 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.9.2 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.10.0.beta1 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.9.1 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.9.0 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.9.0.rc.1 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.8.4 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.8.3 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.8.2 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.8.1 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.8.0 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend_devise_token_auth-2.8.0.alpha.14 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend_devise_token_auth-2.8.0.alpha.13 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend_devise_token_auth-2.8.0.alpha.12 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend_devise_token_auth-2.8.0.alpha.11 app/views/spree/admin/promotions/_actions.html.erb