diff --git a/app/views/albums/_albums.html.erb b/app/views/albums/_albums.html.erb index b0cb14a..7db67b0 100644 --- a/app/views/albums/_albums.html.erb +++ b/app/views/albums/_albums.html.erb @@ -8,6 +8,7 @@
<% if album.album_thumbnail -%><% end -%> + <% if (index + 1) % 3 == 0 or albums.last == album -%>
<% end -%> <% end -%>
diff --git a/app/views/albums/index.html.erb b/app/views/albums/index.html.erb index 9b6821f..de5de77 100644 --- a/app/views/albums/index.html.erb +++ b/app/views/albums/index.html.erb @@ -1,7 +1,7 @@ <% throw_content :for_sidebar do -%> <% if allowed_to?(:create_albums) -%>Create Album Create An Album
<% end -%> <% if allowed_to?(:upload_images) -%> Upload Image
<% end %> -
+

Popular Tags

<%= tag_cloud @tags %>
diff --git a/app/views/albums/show.html.erb b/app/views/albums/show.html.erb index 6d0a80a..1a9a22f 100644 --- a/app/views/albums/show.html.erb +++ b/app/views/albums/show.html.erb @@ -4,18 +4,17 @@ <% if allowed_to?(:delete_albums) -%> Destroy Album
<% end %> <% if allowed_to?(:upload_images) -%> Upload Image
<% end %> - <% unless @album.tags.empty? -%> -
-

Album Tags

- <%= @album.tags.collect { |t| "#{t.name}" }.join(' ') %> -
- <% end -%> - <% ptags = @photos.collect { |p| p.photo_tags.collect { |pt| pt.tag.name } }.flatten.uniq -%> - <% unless ptags.empty? -%> -
-

Tags in Photos

- <%= ptags.collect { |t| "#{t}" }.join(' ') %> + <% if !@album.tags.empty? and !ptags.empty? -%> +
+ <% unless @album.tags.empty? -%> +

Album Tags

+ <%= @album.tags.collect { |t| "#{t.name}" }.join(' ') %> + <% end -%> + <% unless ptags.empty? -%> +

Tags in Photos

+ <%= ptags.collect { |t| "#{t}" }.join(' ') %> + <% end -%>
<% end -%> <% end -%> diff --git a/app/views/layout/application.html.erb b/app/views/layout/application.html.erb index 5a73525..602c8ae 100644 --- a/app/views/layout/application.html.erb +++ b/app/views/layout/application.html.erb @@ -10,6 +10,7 @@ +