<% if album.cover == "default" %>
<%= image_tag "gallery/default.jpg" %>
<% else %>
<% end %>
<%= album.name %>
<% if can_edit_or_delete?(album) %>
- <%= link_to (content_tag(:i,"",:class=>"icon-trash danger")), admin_gallery_path(album.id), "data-confirm" => "Are you sure?", :method=>:delete %>
<% end %>
- <%= (Category.find(album.category_id).title rescue album.category_id) %>
<% album.tags.each do |tag| %>
<% r = @tags.select { |k| k.id.to_s == tag.id.to_s } %>
- <%= r.map {|t| t.name}[0]%>
<%end%>