2012-07-26 22:26:23 +02:00
|
|
|
<div class="row">
|
|
|
|
<%= render 'shared/home_slider' %>
|
|
|
|
</div>
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
<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.collection.url %>
|
|
|
|
<div class="caption">
|
|
|
|
<h5><%= collection.title %></h5>
|
|
|
|
<p><%= collection.description %></p>
|
|
|
|
<p class="view-btn"><%= link_to 'View', (collection_path(collection) unless collection.albums.empty? || collection.albums.first.photos.empty?), {:class => 'btn btn-primary'} %></p>
|
|
|
|
<%= ratings_for collection %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2012-07-24 23:26:16 +02:00
|
|
|
|
2009-06-12 01:04:57 +02:00
|
|
|
|
2011-04-25 07:54:40 +02:00
|
|
|
<%= content_for :action_links do %>
|
2012-07-24 23:26:16 +02:00
|
|
|
<% if current_user and current_user.has_role?("admin") %>
|
|
|
|
<%= link_to "New collection", new_collection_path %>
|
|
|
|
<% end %>
|
2009-06-16 21:43:03 +02:00
|
|
|
<% end %>
|
2012-07-24 23:26:16 +02:00
|
|
|
|