<% if product_pictures.empty? %>
  <div class="no_picture">
  <%= t('stizun.product.no_picture') %>
  </div>
<% else %>
  <% if product_pictures.main.empty? %>
    <%= image_tag product_pictures.first.file.url(:medium) %>    
  <% else %>
    <%= image_tag product_pictures.main.first.file.url(:medium) %>
  <% end %>
  
  <% product_pictures[0..3].each do |pp| %>
  
    <div class="thumb">
    <%= image_tag pp.file.url(:thumb), :style => 'float: left' %>
    </div>
  <% end %>
  <div style="clear: both"></div>
<% end %>
<% if product_pictures.empty? %>
  <div class="no_picture">
  <%= t('stizun.product.no_picture') %>
  </div>
<% else %>
  <% if product_pictures.main.empty? %>
    <%= image_tag product_pictures.first.file.url(:medium) %>    
  <% else %>
    <%= image_tag product_pictures.main.first.file.url(:medium) %>
  <% end %>
  
  <% (product_pictures - product_pictures.main)[0..3].each do |pp| %>
  
    <div class="thumb">
    <%= image_tag pp.file.url(:thumb), :style => 'float: left' %>
    </div>
  <% end %>
  <div style="clear: both"></div>
<% end %>
Exclude the main picture from the thumbnail list.
Exclude the main picture from the thumbnail list.
