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/index.html.erb

51 lines
1.4 KiB
Plaintext
Raw Normal View History

2008-06-27 00:13:15 -04:00
<% throw_content :for_sidebar do -%>
<% if allowed_to?(:create_albums) -%><a href="<%= url(:new_album) -%>"><img src="/images/folder-new.png" alt="Create Album" /> Create An Album</a><br /><% end -%>
<% if allowed_to?(:upload_images) -%><a href="<%= url(:new_photo) -%>"><img src="/images/emblem-photos.png" /> Upload Image</a><br /><% end %>
<div class="tag_cloud">
2008-06-27 00:13:15 -04:00
<p>Popular Tags</p>
<%= tag_cloud @tags %>
</div>
<% end -%>
<% throw_content :for_stylesheet do -%>
.photo_collection_item {
2008-06-27 21:28:18 -04:00
word-wrap: break-word;
2008-06-27 00:13:15 -04:00
width: 170px;
height: 200px;
2008-06-27 21:28:18 -04:00
margin-top: 15px;
2008-06-27 00:13:15 -04:00
padding: 5px;
text-align: center;
border: 1px solid #BBB;
2008-06-27 21:28:18 -04:00
float: left;
position: relative;
}
.col_1 {
margin-left: 10px;
}
.col_2 {
margin-left: 10px;
}
.col_0 {
margin-left: 10px;
2008-06-27 00:13:15 -04:00
}
<% end -%>
<% if @albums.empty? -%>
<p><em><strong>There were no albums found!</strong></em></p>
<% else -%>
2008-06-27 21:28:18 -04:00
<% @albums.each_with_index do |album, index| -%>
<div class="photo_collection_item col_<%= (index + 1) % 3 -%>">
2008-06-27 00:13:15 -04:00
<p><a href="<%= url(:album, :id => album.name.gsub(/ /, '_')) -%>"><%= album.name -%></a> (<%= album.photos.size -%> photos)</p>
<% if album.album_thumbnail -%><a href="<%= url(:album, :id => album.name.gsub(/ /, '_')) -%>"><img src="<%= thumbnail_photo_url(album.album_thumbnail) -%>" /></a><% end -%>
</div>
<% end -%>
2008-06-27 21:28:18 -04:00
<br style='clear:both;' />
<%= partial 'shared/pagination_links' %>
2008-06-27 00:13:15 -04:00
<% end -%>