Sha256: 15db4e1d9aa8f627335ac4b66cd91843fb7e16c00d461b6098717c3837c4e662
Contents?: true
Size: 1.29 KB
Versions: 3
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), :large => i.attachment.url(:large)) %></li> <% end %> </ul> <% end %> <% if @product.has_variants? has_checked = false %> <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), :large => i.attachment.url(:large)) %></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), :large => image.attachment.url(:large)).to_json %>; <% end %> <% end %> </script> <% end %>
Version data entries
3 entries across 3 versions & 1 rubygems