Sha256: 8c554cbbe558ec6bbd3bd9cd0efe8ffff0f95342a305137d68325b01dc2fa2bb

Contents?: true

Size: 1.11 KB

Versions: 7

Compression:

Stored size: 1.11 KB

Contents

<div class="panel-body calculator-fields">
  <% promotion_action.promotion_action_line_items.each do |item| %>
    <strong><%= item.quantity %> x <%= item.name %></strong>
    <%= item.variant.options_text %>
  <% end %>

  <% if promotion_action.promotion_action_line_items.empty? %>
    <% line_items = promotion_action.promotion_action_line_items %>
    <% line_items.build %>

    <% line_items.each_with_index do |line_item, index| %>
      <div class="add-line-item">
        <% line_item_prefix = "#{param_prefix}[promotion_action_line_items_attributes][#{index}]" %>
        <div class="form-group">
          <%= label_tag "#{line_item_prefix}_variant_id", Spree.t(:variant) %>
          <%= hidden_field_tag "#{line_item_prefix}[variant_id]", line_item.variant_id, class: "variant_autocomplete fullwidth-input" %>
        </div>
        <div class="form-group no-marginb">
          <%= label_tag "#{line_item_prefix}_quantity", Spree.t(:quantity) %>
          <%= number_field_tag "#{line_item_prefix}[quantity]", line_item.quantity, min: 1, class: 'form-control' %>
        </div>
      </div>
    <% end %>
  <% end %>
</div>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
spree_backend-3.2.2 app/views/spree/admin/promotions/actions/_create_line_items.html.erb
spree_backend-3.3.0.rc1 app/views/spree/admin/promotions/actions/_create_line_items.html.erb
spree_backend-3.2.1 app/views/spree/admin/promotions/actions/_create_line_items.html.erb
spree_backend-3.2.0 app/views/spree/admin/promotions/actions/_create_line_items.html.erb
spree_backend-3.2.0.rc3 app/views/spree/admin/promotions/actions/_create_line_items.html.erb
spree_backend-3.2.0.rc2 app/views/spree/admin/promotions/actions/_create_line_items.html.erb
spree_backend-3.2.0.rc1 app/views/spree/admin/promotions/actions/_create_line_items.html.erb