Changeset 1310
- Timestamp:
- 08/02/08 21:37:30 (4 months ago)
- Files:
-
- trunk/app/controllers/image_controller.rb (modified) (1 diff)
- trunk/app/views/image/list.html.erb (added)
- trunk/app/views/show/show.rhtml (modified) (2 diffs)
- trunk/public/stylesheets/screen.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/app/controllers/image_controller.rb
r1193 r1310 2 2 3 3 def list 4 @images = current_user.shows.find(params[:show]).images 4 @show = current_user.shows.find(params[:show]) 5 @images = @show.images.paginate(:per_page => 10, :page => (params[:page] or 1), :order => 'created_at desc') 5 6 end 6 7 trunk/app/views/show/show.rhtml
r1308 r1310 46 46 <h3>Images</h3> 47 47 48 <p>Les derniÚres images ajoutées :</p>49 48 50 49 <% unless @show.images.empty? %> 50 <p>Les derniÚres images modifiées :</p> 51 51 52 <ul class="images"> 52 <% for image in @show.images %>53 <% for image in @show.images.find(:all, :order => 'updated_at desc', :limit => 5) %> 53 54 <li> 54 55 <%= image_tag image.public_filename(:thumb) %> 55 <%= h image.title %> 56 <div> 57 <%= h image.title %> 58 <br/>modifiée <%= format_date(image.updated_at) %> 59 </div> 56 60 </li> 57 61 <% end %> … … 59 63 <% end %> 60 64 61 <p>Ajouter <%= link_to("une nouvelle image", :controller => "image", :action => "create", :show => @show) %></p> 65 <div class="actions"> 66 <%= link_to "Toutes les images", :controller => "image", :action => "list", :show => @show %> 67 <%= link_to("Ajouter une nouvelle image", :controller => "image", :action => "create", :show => @show) %> 68 </div> 62 69 63 70 <h3>Statistiques</h3> trunk/public/stylesheets/screen.css
r1307 r1310 69 69 #content li.hreview abbr.rating { float: right; margin: 0; border: none; } 70 70 #content li.hreview blockquote.description { margin: 2px 0 6px 56px; padding: 0; line-height: 1.5em; } 71 #content ul.images li img { float: left; margin-right: 15px; } 72 #content ul.images li { clear: both; } 71 73 #content #filter { float: right; margin: 0; } 72 74 #content #filter p { margin: 0; }
