Sha256: c488a2c2d66f85e29ad0e535a765026319ed89cbcdf99e97306f6e9647739ad5

Contents?: true

Size: 1.45 KB

Versions: 2

Compression:

Stored size: 1.45 KB

Contents

<h4><%= Spree.t(:available_parts) %></h4>
<table class="index">
  <thead>
    <tr>
      <th><%= Spree.t(:name) %></th>
      <th><%= Spree.t(:options) %></th>
      <th><%= Spree.t(:qty) %></th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <% @available_products.each do |part| %>
      <tr id="<%= dom_id(part) %>"
        class="<%= "with-variants" if part.has_variants? %>">

        <td><%= part.name %></td>
        <td>
          <% if part.has_variants? %>
            <%- opts = part.variants.map {|v| [variant_options(v), v.id] } %>
            <%= select_tag "part[id]",
              options_for_select(opts),
              include_blank: Spree.t(:user_selectable)
            %>
          <% else %>
            <%= hidden_field_tag "part[id]", part.master.id %>
            <%= Spree.t(:no_variants) %>
          <% end %>
        </td>
        <td><%= text_field_tag "part[count]", 1 %></td>
        <td class="actions">
          <%= image_tag "spinner.gif", :style => "display:none", :class => "spinner" %>
          <%= link_to(icon('add') + ' ' + Spree.t(:select),
                      admin_product_parts_path(product),
                      :data => { 'target' => dom_id(part), 'master-variant-id' => part.master.id},
                      :class => "add_product_part_link") %>
        </td>
      </tr>
    <% end %>
    <% if @available_products.empty? %>
     <tr><td colspan="3"><%= Spree.t(:no_match_found) %>.</td></tr>
    <% end %>
  </tbody>
</table>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
solidus_product_bundle-1.0.1 app/views/spree/admin/parts/available.html.erb
solidus_product_bundle-1.0.0 app/views/spree/admin/parts/available.html.erb