commit 8ff59b90e699695c175ab594a2687ef11878682d
Author: Marc Dequènes (Duck) <Duck@DuckCorp.org>
Date:   Sat Jun 6 02:32:53 2009 +0200

    [evol] added artwork view and now use the new image frame in all views

diff --git a/app/controllers/view_controller.rb b/app/controllers/view_controller.rb
index a56b875..36158a3 100644
--- a/app/controllers/view_controller.rb
+++ b/app/controllers/view_controller.rb
@@ -1,4 +1,8 @@
 class ViewController < ApplicationController
+  def artwork
+    @artwork = Artwork.find(params[:id])
+  end
+
   def set
     @artwork_set = ArtworkSet.find(params[:id])
   end
diff --git a/app/views/view/artwork.rhtml b/app/views/view/artwork.rhtml
new file mode 100644
index 0000000..51257e8
--- /dev/null
+++ b/app/views/view/artwork.rhtml
@@ -0,0 +1,25 @@
+<h1><%= sprintf(_("View of artwork '%s'"), @artwork.title) %></h1>
+
+<div style="float: right;">
+  <h2><%= _("Steps") %></h2>
+
+  <table>
+<% @artwork.artwork_step_images.each do |step| %>
+    <tr>
+      <td><%= display_image_frame(step, :size => :thumb_small, :display_size => false, :display_title => false, :with_link => false) %></td>
+      <td><%= step.date %></td>
+    <tr>
+<% end %>
+  </table>
+</div>
+
+<p>
+<%= sprintf(_("This artwork is part of the '%s' set"), link_to(@artwork.artwork_set.name, :action => 'set', :id => @artwork.artwork_set.id)) %>
+<% if @artwork.artwork_group %>
+<br />
+  <%= sprintf(_("This artwork is part of the '%s' group"), link_to(@artwork.artwork_group.name, :action => 'group', :id => @artwork.artwork_group.id)) %>
+<% end %>
+</p>
+
+<%= display_image_frame(@artwork.image, :size => :thumb_big, :with_link => false) %>
+
diff --git a/app/views/view/group.rhtml b/app/views/view/group.rhtml
index 8795840..fee3c5c 100644
--- a/app/views/view/group.rhtml
+++ b/app/views/view/group.rhtml
@@ -7,7 +7,7 @@
 <h2><%= _("Artworks:") %></h2>
 <p>
 <% @artwork_group.artworks.each do |artwork| %>
-	<%= display_artwork_frame(artwork, :frame_type => :float, :size => :thumb_small, :display_size => false) %>
+	<%= display_image_frame(artwork.image, :frame_type => :float, :size => :thumb_small, :display_size => false) %>
 <% end %>
   <br style="clear: both;"/>
 </p>
diff --git a/app/views/view/set.rhtml b/app/views/view/set.rhtml
index 4c1a1b6..2c507a3 100644
--- a/app/views/view/set.rhtml
+++ b/app/views/view/set.rhtml
@@ -3,7 +3,7 @@
 <h2><%= _("Groups:") %></h2>
 <p>
 <% @artwork_set.artwork_groups.each do |group| %>
-	<%= link_to(display_artwork_frame(group.artworks.last, :frame_type => :float, :size => :thumb_small, :force_title => group.name, :display_size => false), :action => 'group', :id => group.id) %>
+	<%= link_to(display_image_frame(group.artworks.last.image, :frame_type => :float, :size => :thumb_small, :force_title => group.name, :display_size => false, :with_link => false), :controller => '/view', :action => 'group', :id => group.id) %>
 <% end %>
   <br style="clear: both;"/>
 </p>
@@ -11,7 +11,8 @@
 <h2><%= _("Artworks:") %></h2>
 <p>
 <% @artwork_set.artworks.each do |artwork| %>
-	<%= display_artwork_frame(artwork, :frame_type => :float, :size => :thumb_small, :display_size => false) %>
+<%   next if artwork.artwork_group %>
+	<%= display_image_frame(artwork.image, :frame_type => :float, :size => :thumb_small, :display_size => false) %>
 <% end %>
   <br style="clear: both;"/>
 </p>
diff --git a/app/views/view/tree.rhtml b/app/views/view/tree.rhtml
index 9b6da82..5393e10 100644
--- a/app/views/view/tree.rhtml
+++ b/app/views/view/tree.rhtml
@@ -2,10 +2,10 @@
 
 <table>
 <% ArtworkSet.find(:all, :order => 'name ASC').each do |set| %>
-	<tr><th><%= link_to(display_artwork_frame(set.artworks.last, :frame_type => :cell, :size => :thumb_small, :force_title => set.name, :display_size => false), :action => 'set', :id => set.id) %></th>
+	<tr><th><%= link_to(display_image_frame(set.artworks.last.image, :frame_type => :cell, :size => :thumb_small, :force_title => set.name, :display_size => false, :with_link => false), :controller => '/view', :action => 'set', :id => set.id) %></th>
 <%   unless set.artwork_groups.empty? %>
 <%     set.artwork_groups.each do |group| %>
-			<td><%= link_to(display_artwork_frame(group.artworks.last, :frame_type => :cell, :size => :thumb_small, :force_title => group.name, :display_size => false), :action => 'group', :id => group.id) %></td>
+			<td><%= link_to(display_image_frame(group.artworks.last.image, :frame_type => :cell, :size => :thumb_small, :force_title => group.name, :display_size => false, :with_link => false), :controller => '/view',  :action => 'group', :id => group.id) %></td>
 <%     end %>
 <%   end %>
 	</tr>
diff --git a/app/views/welcome/index.rhtml b/app/views/welcome/index.rhtml
index 2c1c60d..739ecfd 100644
--- a/app/views/welcome/index.rhtml
+++ b/app/views/welcome/index.rhtml
@@ -10,7 +10,7 @@
     # reload to ensure joint objects are well loaded
     artwork = Artwork.find(artwork.id)
    %>
-  <%= display_artwork_frame(artwork, :frame_type => :float) %>
+  <%= display_image_frame(artwork.image, :frame_type => :float) %>
   <% end %>
   <br style="clear: both;"/>
 </p>
