Sha256: c93382f39fb729eff8c3412ec57448d1fa36b0a33b38b04b72daa8368ebec2e2

Contents?: true

Size: 956 Bytes

Versions: 4

Compression:

Stored size: 956 Bytes

Contents

<!-- no need for thumnails unless there is more then one image -->
<% if product.images.size > 1 %>
  <ul class="thumbnails product-gallery">
    <% product.images[1..product.images.size].each do |i| %>
      <li class="span1">
        <a href="<%= i.attachment.url(:large) %>" class="thumbnail gallery-item" rel="gallery">
          <%= image_tag(i.attachment.url(:mini)) %>
        </a>
      </li>
    <% end %>


    <% if @product.has_variants?
         has_checked = false %>
      <% @variants.each do |v|
        checked = !has_checked && (v.available?)
        has_checked = true if checked

        if checked
          v.images.each do |i| %>
            <li class="span1">
              <a href="<%= i.attachment.url(:large) %>" class="thumbnail" rel="gallery">
                <%= image_tag(i.attachment.url(:mini)) %>
              </a>
            </li>
          <% end %>
        <% end %>
      <% end %>
    <% end %>

  </ul>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
synergy_bootstrap_theme-0.0.4 app/views/products/_thumbnails.html.erb
synergy_bootstrap_theme-0.0.3 app/views/products/_thumbnails.html.erb
synergy_bootstrap_theme-0.0.2 app/views/products/_thumbnails.html.erb
synergy_bootstrap_theme-0.0.1 app/views/products/_thumbnails.html.erb