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

29 lines
1.5 KiB
Plaintext
Raw Permalink Normal View History

2008-06-27 00:13:15 -04:00
<% throw_content :for_sidebar do -%>
2008-06-27 21:28:18 -04:00
<% 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 -%>
2008-06-27 00:13:15 -04:00
<% if allowed_to?(:edit_album) -%><a href="<%= url(:edit_album, :id => @album.name.gsub(/ /, '_')) -%>" rel="nofollow"><img src="/images/document-save.png" /> Edit Album</a><br /><% end %>
<% if allowed_to?(:delete_albums) -%><a href="<%= url(:delete_album, :id => @album.name.gsub(/ /, '_')) -%>" onclick="if(!confirm('Are you sure you want to delete this album?')){return false;}"><img src="/images/edit-delete.png" /> Destroy Album</a><br /><% end %>
<% if allowed_to?(:upload_images) -%><a href="<%= url(:new_photo, :photo => { :album_id => @album.id }) -%>"><img src="/images/emblem-photos.png" /> Upload Image</a><br /><% end %>
<% ptags = @photos.collect { |p| p.photo_tags.collect { |pt| pt.tag.name } }.flatten.uniq -%>
2008-07-27 00:44:51 -04:00
<% if !@album.tags.empty? or !ptags.empty? -%>
2008-07-24 04:41:17 -04:00
<div id="tag_cloud">
<% unless @album.tags.empty? -%>
<p>Album Tags</p>
<%= @album.tags.collect { |t| "<a href='#{url(:tag, :id => t.name)}' title='#{t.name}'>#{t.name}</a>" }.join(' ') %>
<% end -%>
<% unless ptags.empty? -%>
<p>Tags in Photos</p>
<%= ptags.collect { |t| "<a href='#{url(:tag, :id => t)}' title='#{t}'>#{t}</a>" }.join(' ') %>
<% end -%>
</div>
<% end -%>
2008-06-27 00:13:15 -04:00
<% end -%>
<div class="entry">
2008-06-27 00:13:15 -04:00
<h1><%= @album.name -%></h1>
<%= partial 'photos', :photos => @photos %>
2008-06-27 00:13:15 -04:00
</div>
<%= partial 'shared/pagination_links' %>