<% 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 %> <% end -%> <% throw_content :for_stylesheet do -%> .photo { margin: 10px; } <% end -%>

<%= @album.name -%>

<% @album.photos.each_with_index do |photo, idx| -%> <% if (idx + 1) % 3 == 1 -%>

<% end -%> <% if (idx + 1) % 3 == 0 or @album.photos.size == (idx + 1) -%>

<% end -%> <% end -%> <% unless @album.tags.empty? -%>
<% end -%>