photomix/app/views/collections/_row_collections.html.erb

29 lines
1.5 KiB
Plaintext

<div class="row">
<div class="span12">
<% @collections.in_groups_of(4).each do |group| %>
<% unless group.empty? %>
<ul class="thumbnails">
<% group.compact.each_with_index do |collection, index| %>
<li class="span3">
<div class="thumbnail">
<%= image_tag collection.albums.first.photos.first.attachment.thumb.url %>
<div class="caption">
<h5 class="title"><%= collection.title %></h5>
<em class="descr"><%= collection.description %></em>
<div class="controls">
<p class="view-btn"><%= link_to 'View', (collection_path(collection) unless collection.albums.empty? || collection.albums.first.photos.empty?), {:class => 'btn btn-primary'} %></p>
<div class="tooltips">
<span rel="popover" class="icon-th-large icon-popover" data-content="<%= t(:albums_counter, :count => collection.albums.size) %>"></span>
<span rel="popover" class="icon-th icon-popover" data-content="<%= t(:photos_counter, :count => collection.photos_count) %>"></span>
</div>
<%= ratings_for collection %>
</div>
</div>
</div>
</li>
<% end %>
</ul>
<% end %>
<% end %>
</div>
</div>