51 lines
1.4 KiB
Plaintext
51 lines
1.4 KiB
Plaintext
<% 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 id="tag_cloud">
|
|
<p>Popular Tags</p>
|
|
<%= tag_cloud @tags %>
|
|
</div>
|
|
<% end -%>
|
|
|
|
<% throw_content :for_stylesheet do -%>
|
|
|
|
.photo_collection_item {
|
|
word-wrap: break-word;
|
|
width: 170px;
|
|
height: 180px;
|
|
margin-top: 15px;
|
|
padding: 5px;
|
|
text-align: center;
|
|
border: 1px solid #BBB;
|
|
float: left;
|
|
position: relative;
|
|
}
|
|
|
|
.col_1 {
|
|
margin-left: 10px;
|
|
}
|
|
|
|
.col_2 {
|
|
margin-left: 10px;
|
|
}
|
|
|
|
.col_0 {
|
|
margin-left: 10px;
|
|
}
|
|
|
|
<% end -%>
|
|
|
|
<% if @albums.empty? -%>
|
|
<p><em><strong>There were no albums found!</strong></em></p>
|
|
<% else -%>
|
|
<% @albums.each_with_index do |album, index| -%>
|
|
<div class="photo_collection_item col_<%= (index + 1) % 3 -%>">
|
|
<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 -%>
|
|
|
|
<br style='clear:both;' />
|
|
|
|
<%= partial 'shared/pagination_links' %>
|
|
<% end -%> |