<table class="index">
  <tr>
    <th><%= t(:product) %></th>
    <th><%= t(:qty) %></th>
    <th>&nbsp;</th>
  </tr>
  <% promotion_action.promotion_action_line_items.each do |item| %>
    <tr>
      <td>
        <%= item.variant.product.name %> <%= item.variant.options_text %>
      </td>
      <td>
        <%= item.quantity %>
      </td>
      <td>
        <%= image_tag 'admin/icons/cross.png' %>
      </td>
    </tr>
  <% end %>
</table>

<%= hidden_field_tag "#{param_prefix}[line_items_string]", promotion_action.line_items_string,
                     :class => 'line_items_string' %>

<div class="add-line-item">
  <fieldset>
    <legend><%= t(:add_product) %></legend>
    <div style="float:left; width:50%; margin-right:5%;">
      <%= label_tag :add_product_name, t(:name_or_sku) %>
      <%= text_field_tag :add_product_name, nil, :class => 'fullwidth' %>
      <%= hidden_field_tag :add_variant_id %>
      <%= hidden_field_tag :add_line_item_variant_id %>
    </div>
    <div style="float:left; width:10%; margin-right:5%;">
      <%= label_tag :add_quantity, t(:qty) %>
      <%= text_field_tag :add_quantity, 1 %>
    </div>
    <div style="float:left; width:j0%">
      &nbsp;<br />
      <button class="add small"> <%= t(:add) %></button>
    </div>
  </fieldset>
</div>
