This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
tuxbliki/app/views/albums/_albums.html.erb

16 lines
716 B
Plaintext

<% if albums.nil? or albums.empty? -%>
<p><em><strong>There were no albums found!</strong></em></p>
<% else -%>
<% albums.each_with_index do |album, index| -%>
<div class="photo_album col_<%= (index + 1) % 3 -%>">
<div><a href="<%= url(:album, :id => album.name.gsub(/ /, '_')) -%>"><%= album.name -%></a> (<%= album.photos.size -%> photos)</div>
<br style="clear: both" />
<% if album.album_thumbnail -%><a href="<%= url(:album, :id => album.name.gsub(/ /, '_')) -%>"><img src="<%= thumbnail_photo_url(album.album_thumbnail) -%>" /></a><% end -%>
</div>
<% if (index + 1) % 3 == 0 or albums.last == album -%><br style="clear:both" /><% end -%>
<% end -%>
<br style="clear: both" />
<% end -%>