ref: master
plugins/products/views/blocks/featured_products.html.erb
<% extend ProductsPlugin::ProductsHelper %> <%= block_title(block.title, block.subtitle) %> <% unless block.products.blank? %> <%= link_to content_tag(:span, _('Previous')), '#', :class => 'featured-product-prev featured-product-arrow' %><%= link_to content_tag(:span, _('Next')), '#', :class => 'featured-product-next featured-product-arrow' %> <% else %> <%= _('Please, edit this block and choose some products') %> <% end %><% block.products.in_groups_of(block.groups_of).each do |group| %>
- <% end %>
<% group.reject{ |x| x.nil? }.each_with_index do |p, i| %>
- <%= link_to content_tag(:img, nil, :src => p.image.public_filename(:thumb), :alt => p.name, :class => ('reflect' if block.reflect)), product_path(p), :class => 'featured-product-image' %>
<% end %>