pdf collection. links for pdf

This commit is contained in:
Espen Antonsen 2009-06-20 16:30:54 +02:00
parent af589525c9
commit a887a5e67d
5 changed files with 12 additions and 2 deletions

View file

@ -24,6 +24,7 @@
<% content_for :action_links do %> <% content_for :action_links do %>
<% if has_role?("admin") %> <% if has_role?("admin") %>
<%= link_to "PDF", album_path(@album, :format => 'pdf') %> |&nbsp;
<%= link_to "Edit album", edit_album_path(@album) %> |&nbsp; <%= link_to "Edit album", edit_album_path(@album) %> |&nbsp;
<%= link_to "Edit all photos", edit_multiple_album_photos_path(@album) %> |&nbsp; <%= link_to "Edit all photos", edit_multiple_album_photos_path(@album) %> |&nbsp;
<%= link_to "Add photos", upload_album_photos_path(@album) %> <%= link_to "Add photos", upload_album_photos_path(@album) %>

View file

@ -1,3 +1,3 @@
<h1><%= @album.title %></h1> <h1><%= @album.title %></h1>
<%= render :partial => @album.photos.find(:all, :limit => 10) %> <%= render :partial => @album.photos %>

View file

@ -15,6 +15,7 @@
<% content_for :action_links do %> <% content_for :action_links do %>
<% if has_role?("admin") %> <% if has_role?("admin") %>
<%= link_to "PDF", collection_path(@collection, :format => 'pdf') %> |&nbsp;
<%= link_to "Edit collection", edit_collection_path(@collection) %> | <%= link_to "Edit collection", edit_collection_path(@collection) %> |
<%= link_to "New album", new_collection_album_path(@collection) %> <%= link_to "New album", new_collection_album_path(@collection) %>
<% end %> <% end %>

View file

@ -0,0 +1,8 @@
<h2><%= h @collection.title %></h2>
<p><%= h @collection.description %></p>
<% for album in @collection.albums %>
<h3><%= album.title %></h3>
<p><%= render :partial => album.photos %></p>
<% end %>

View file

@ -1 +1 @@
<%= image_tag photo.public_path_original %><br/> <%= image_tag photo.path_modified_public("single") %><br/>