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

27 lines
1.1 KiB
Plaintext

<li class="rgalbum" data-image-id="<%= album.id %>">
<div class="check">
<input type="checkbox" class="checkbox" name='album_id' value='<%= album.id %>'>
</div>
<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>
<% if can_edit_or_delete?(album) %>
<li><%= link_to (content_tag(:i,"",:class=>"icon-trash danger")), admin_gallery_path(album.id), "data-confirm" => "Are you sure?", :method=>:delete %></li>
<% end %>
<li class="albumcateg"><%= (Category.find(album.category_id).title rescue album.category_id) %></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>