Sha256: 24cfa642782946472e7325daedc5e497db93fe2175cd6158a551b9066be3bbe6
Contents?: true
Size: 1.29 KB
Versions: 14
Compression:
Stored size: 1.29 KB
Contents
<!-- no need for thumnails unless there is more then one image --> <% if product.images.size > 1 %> <ul id="product-thumbnails" class="thumbnails"> <% product.images.each do |i| %> <li><%= link_to(image_tag(i.attachment.url(:mini)), i.attachment.url(:product)) %></li> <% end %> </ul> <% end %> <% if @product.has_variants? has_checked = false %> <h4 id="variant-images"> <%= t('images_for') %>: <span><%= @selected_variant.options_text %></span> </h4> <ul id="variant-thumbnails" class="thumbnails"> <% @variants.each do |v| checked = !has_checked && (v.available?) has_checked = true if checked if checked v.images.each do |i| %> <li><%= link_to(image_tag(i.attachment.url(:mini)), i.attachment.url(:product)) %></li> <% end %> <% end %> <% end %> </ul> <% end %> <% content_for :head do %> <script type="text/javascript" charset="utf-8"> var images = new Array(); <% @variants.each do |v| %> images[<%= v.id.to_s %>] = new Array(); <% v.images.each_with_index do |image, i| %> images[<%= v.id.to_s %>][<%= i %>] = <%== link_to(image_tag(image.attachment.url(:mini)), image.attachment.url(:product)).to_json %>; <% end %> <% end %> </script> <% end %>
Version data entries
14 entries across 14 versions & 6 rubygems