Skip to content

Commit

Permalink
Merge branch 'lstoll_working'
Browse files Browse the repository at this point in the history
  • Loading branch information
lstoll committed Sep 8, 2008
2 parents 0fdbda8 + f215662 commit 7496baf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
8 changes: 8 additions & 0 deletions app/models/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,12 @@ def number_of_presenters
jams.each {|jam| presenters += jam.number_of_presenters}
presenters
end

def previous_event
if event = Event.find(:first, :conditions => ["held_at < ?", held_at], :order => "held_at DESC")
return event
else
return self
end
end
end
21 changes: 3 additions & 18 deletions app/views/events/show_upcoming.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,9 @@

.slideshow
%ul
%li
%img{ :title => "Black & White", :src => "/images/temp/lightning.jpg", :alt => "Lightning" }/
%li
%img{ :title => "Fusce quam mi, sagittis nec, adipiscing at, sodales quis", :src => "/images/temp/lotus.jpg", :alt => "Lotus" }/
%li
%img{ :title => "Suspendisse volutpat posuere dui. Suspendisse sit amet lorem et risus faucibus pellentesque.", :src => "/images/temp/mojave.jpg", :alt => "Mojave" }/
%li
%img{ :title => "Proin erat nisi", :src => "/images/temp/pier.jpg", :alt => "Pier" }/
%li
%img{ :title => "Caption text from title", :src => "/images/temp/sea-mist.jpg", :alt => "Sea Mist" }/
%li
%img{ :title => "Flowing Rock Caption", :src => "/images/temp/flowing-rock.jpg", :alt => "Flowing Rock" }/
%li
%img{ :title => "Stones - from Apple images", :src => "/images/temp/stones.jpg", :alt => "Stones" }/
%li
%img{ :title => "Apple nature desktop images", :src => "/images/temp/grass-blades.jpg", :alt => "Grass Blades" }/
%li
%img{ :title => "Ut rutrum, lectus eu pulvinar elementum, lacus urna vestibulum ipsum", :src => "/images/temp/ladybug.jpg", :alt => "Ladybug" }/
- @event.previous_event.flickr_photos.featured.each do |fp|
%li
%img{ :title => fp.title, :src => fp.url, :alt => fp.title }

%p
= pluralize(@event.number_of_presenters, "presenter") + "."
Expand Down

0 comments on commit 7496baf

Please sign in to comment.