Sha256: 97e291e265a8c74d52177c1a74eb71ff54bd5bebc8b067ff70347bdc46f3efda

Contents?: true

Size: 1.6 KB

Versions: 23

Compression:

Stored size: 1.6 KB

Contents

<fieldset id="rule_fields" class="no-border-bottom no-border-top">

  <%= form_tag spree.admin_promotion_promotion_rules_path(@promotion), remote: true, id: 'new_product_rule_form' do %>
    <fieldset>
      <legend align="center"><%= t('spree.rules') %></legend>

      <% if can?(:update, @promotion) %>
        <div class="field">
          <%= label_tag :promotion_rule_type, t('spree.discount_rules') %>
          <%= select_tag('promotion_rule[type]', options_for_promotion_rule_types(@promotion), include_blank: t(:choose_promotion_rule, scope: 'spree'), class: 'custom-select fullwidth', required: true) %>
        </div>
        <div class="filter-actions actions">
          <%= button_tag t('spree.actions.add'), class: 'btn btn-primary' %>
        </div>
      <% end %>
    </fieldset>
  <% end %>

    <%= form_for @promotion, url: object_url, method: :put do |f| %>
      <fieldset class="no-border-top">
        <div id="rules" class="filter_list">
          <% if @promotion.rules.any? %>
            <div class="col-12">
              <div class="row">
                <%= render partial: 'promotion_rule', collection: @promotion.rules, locals: {} %>
              </div>
            </div>
          <% else %>
            <div class="no-objects-found">
              <%= t('spree.no_rules_added') %>
            </div>
          <% end %>
        </div>

        <% if can?(:update, @promotion) %>
          <div class="promotion-update filter-actions actions">
            <%= button_tag t('spree.actions.update'), class: 'btn btn-primary' %>
          </div>
        <% end %>
      </fieldset>
    <% end %>
</fieldset>

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
solidus_legacy_promotions-4.4.1 lib/views/backend/spree/admin/promotions/_rules.html.erb
solidus_legacy_promotions-4.4.0 lib/views/backend/spree/admin/promotions/_rules.html.erb
solidus_backend-4.3.4 app/views/spree/admin/promotions/_rules.html.erb
solidus_backend-4.2.4 app/views/spree/admin/promotions/_rules.html.erb
solidus_backend-4.1.5 app/views/spree/admin/promotions/_rules.html.erb
solidus_backend-4.3.3 app/views/spree/admin/promotions/_rules.html.erb
solidus_backend-4.3.2 app/views/spree/admin/promotions/_rules.html.erb
solidus_backend-4.1.4 app/views/spree/admin/promotions/_rules.html.erb
solidus_backend-4.3.1 app/views/spree/admin/promotions/_rules.html.erb
solidus_backend-4.3.0 app/views/spree/admin/promotions/_rules.html.erb
solidus_backend-4.2.3 app/views/spree/admin/promotions/_rules.html.erb
solidus_backend-4.1.3 app/views/spree/admin/promotions/_rules.html.erb
solidus_backend-4.0.4 app/views/spree/admin/promotions/_rules.html.erb
solidus_backend-4.0.3 app/views/spree/admin/promotions/_rules.html.erb
solidus_backend-4.1.2 app/views/spree/admin/promotions/_rules.html.erb
solidus_backend-4.2.2 app/views/spree/admin/promotions/_rules.html.erb
solidus_backend-4.2.1 app/views/spree/admin/promotions/_rules.html.erb
solidus_backend-4.2.0 app/views/spree/admin/promotions/_rules.html.erb
solidus_backend-4.1.1 app/views/spree/admin/promotions/_rules.html.erb
solidus_backend-4.0.2 app/views/spree/admin/promotions/_rules.html.erb