gallery/app/views/admin/galleries/_album.html.erb

22 lines
867 B
Plaintext

<li class="rgalbum">
<a href="<%= admin_gallery_path(album.id) %>">
<% if album.cover == "default" %>
<%= image_tag "gallery/default.jpg" %>
<% else %>
<img src="<%= album.cover_path %>">
<% end %>
<p class="albumname"><%= album.name %></p>
</a>
<ul class="gallery_info clearfix">
<!-- <li class="view"><i class="icons-eye"></i> 321</li> -->
<li><i class="icons-tag"></i></li>
<li><%= link_to (content_tag(:i,"",:class=>"icon-trash danger")), admin_gallery_path(album.id), "data-confirm" => "Are you sure?", :method=>:delete %></li>
<li class="albumcateg"><%= Category.find(album.category_id).title %></li>
</ul>
<ul class="albumtag">
<% album.tags.each do |tag| %>
<% r = @tags.select { |k| k.id.to_s == tag.id.to_s } %>
<li class="label"><%= r.map {|t| t.name}[0]%></li>
<%end%>
</ul>
</li>