<% throw_content :for_sidebar do -%> <% if allowed_to?(:create_albums) -%>Create Album Create An Album
<% end -%> <% if allowed_to?(:edit_album) -%> Edit Album
<% end %> <% if allowed_to?(:delete_albums) -%> Destroy Album
<% end %> <% if allowed_to?(:upload_images) -%> Upload Image
<% end %> <% unless @album.tags.empty? -%>

Album Tags

<%= @album.tags.collect { |t| "#{t.name}" }.join(' ') %>
<% end -%> <% ptags = @photos.collect { |p| p.photo_tags.collect { |pt| pt.tag.name } }.flatten.uniq -%> <% unless ptags.empty? -%>

Tags in Photos

<%= ptags.collect { |t| "#{t}" }.join(' ') %>
<% end -%> <% end -%>

<%= @album.name -%>

<%= partial 'photos', :photos => @photos %>
<%= partial 'shared/pagination_links' %>