diff --git a/app/views/albums/show.html.erb b/app/views/albums/show.html.erb index b892544..6872f10 100644 --- a/app/views/albums/show.html.erb +++ b/app/views/albums/show.html.erb @@ -24,6 +24,7 @@ <% content_for :action_links do %> <% if has_role?("admin") %> +<%= link_to "PDF", album_path(@album, :format => 'pdf') %> | <%= link_to "Edit album", edit_album_path(@album) %> | <%= link_to "Edit all photos", edit_multiple_album_photos_path(@album) %> | <%= link_to "Add photos", upload_album_photos_path(@album) %> diff --git a/app/views/albums/show.pdf.erb b/app/views/albums/show.pdf.erb index 8a40e71..064d7d0 100644 --- a/app/views/albums/show.pdf.erb +++ b/app/views/albums/show.pdf.erb @@ -1,3 +1,3 @@
<%= h @collection.description %>
+ +<% for album in @collection.albums %> +<%= render :partial => album.photos %>
+ +<% end %> \ No newline at end of file diff --git a/app/views/photos/_photo.pdf.erb b/app/views/photos/_photo.pdf.erb index 53a2bf2..1803291 100644 --- a/app/views/photos/_photo.pdf.erb +++ b/app/views/photos/_photo.pdf.erb @@ -1 +1 @@ -<%= image_tag photo.public_path_original %>