Sha256: e020e5d164069d28345c61e9e016f3cd61739989bbd2b2501c51cb97871e1247

Contents?: true

Size: 1.39 KB

Versions: 11

Compression:

Stored size: 1.39 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"><%= plural_resource_name(Spree::PromotionAction) %></legend>
      <% if can?(:update, @promotion) %>
        <div class="field">
          <%= label_tag :action_type, Spree.t(:add_action_of_type)%>
          <%= select_tag 'action_type', options, class: 'custom-select fullwidth' %>
        </div>
        <div class="filter-actions actions">
          <%= button Spree.t('actions.add') %>
        </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">
          <%= Spree.t(:no_actions_added) %>
        </div>
      <% end %>
    </div>
    <% if can?(:update, @promotion) %>
      <div class="filter-actions actions promotion-update">
        <%= button Spree.t('actions.update') %>
      </div>
    <% end %>
  <% end %>

</fieldset>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
solidus_backend-2.4.2 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.4.1 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.3.1 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.4.0 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.4.0.rc1 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.4.0.beta1 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.3.0 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.3.0.rc3 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.3.0.rc2 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.3.0.rc1 app/views/spree/admin/promotions/_actions.html.erb
solidus_backend-2.3.0.beta1 app/views/spree/admin/promotions/_actions.html.erb