<li class="rgalbum">
  <a href="<%= panel_gallery_back_end_album_path(album) %>">
    <% 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")), panel_gallery_back_end_album_path(album), :confirm => "Are you sure?", :method=>:delete %></li>
    <li class="albumcateg"><%= Category.find(album.category_id).title %></li>
  </ul>
  <ul class="albumtag">
    <% album.tagged_ids.each do |tag| %>
      <% r = @tags.select { |k| k.id.to_s == tag } %>
       <li class="label"><%= r.map {|t| t.name}[0]%></li>
    <%end%>
  </ul>
</li>