<li class="rgcustom_album" data-image-id="<%= custom_album.id %>">
  <div class="check">
    <input type="checkbox" class="checkbox" name='custom_album_id' value='<%= custom_album.id %>'>
  </div>
  <a href="<%= admin_custom_gallery_path(custom_album.id) %>">
    <% if custom_album.cover == "default" %>
     <%= image_tag "custom_gallery/default.jpg" %>
    <% else %>
     <img src="<%= custom_album.cover_path %>">
    <% end %>
    <p class="custom_albumname"><%= custom_album.name %></p>
  </a>
  <ul class="custom_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?(custom_album) %>
      <li><%= link_to (content_tag(:i,"",:class=>"icon-trash danger")), admin_custom_gallery_path(custom_album.id), "data-confirm" => "Are you sure?", :method=>:delete %></li>
    <% end %>
    <li class="custom_albumcateg"><%= (Category.find(custom_album.category_id).title rescue custom_album.category_id) %></li>
  </ul>
  <ul class="custom_albumtag">
    <!--
      <%# custom_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>