Sha256: 49b662bf39196c52f42d6ca2f824262106b85efdc5641a4df2c748fe247066a1

Contents?: true

Size: 808 Bytes

Versions: 3

Compression:

Stored size: 808 Bytes

Contents

<%# no need for thumbnails unless there is more than one image %>
<% if (@product.images + @product.variant_images).uniq.size > 1 %>
  <ul id="product-thumbnails" class="thumbnails inline" data-hook>
    <% @product.images.each do |i| %>
      <li class='tmb-all tmb-<%= i.viewable.id %>'>
        <%= link_to(image_tag(i.attachment.url(:mini)), i.attachment.url(:product)) %>
      </li>
    <% end %>

    <% if @product.has_variants? %>
      <% @variants.select(&:available?).each do |v| %>
        <% v.images.each do |i| %>
          <% next if @product.images.include?(i) %>
          <li class='vtmb tmb-<%= i.viewable.id %>'>
            <%= link_to(image_tag(i.attachment.url(:mini)), i.attachment.url(:product)) %>
          </li>
        <% end %>
      <% end %>
    <% end %>
  </ul>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spree_core-1.3.5 app/views/spree/products/_thumbnails.html.erb
spree_core-1.3.4 app/views/spree/products/_thumbnails.html.erb
spree_core-1.3.3 app/views/spree/products/_thumbnails.html.erb