<% if albums.nil? or albums.empty? -%>

There were no albums found!

<% else -%> <% albums.each_with_index do |album, index| -%>
<%= album.name -%> (<%= album.photos.size -%> photos)

<% if album.album_thumbnail -%><% end -%>
<% if (index + 1) % 3 == 0 or albums.last == album -%>
<% end -%> <% end -%>
<% end -%>