Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bring down seats to 50 again. Also added a dynamic notice when seats …

…fill up.
  • Loading branch information...
commit e99fec19ecd1a5d0e4c0d97c0a27f7f5f81fe44e 1 parent b23d6d1
@metaskills authored
View
2  app/models/rsvp.rb
@@ -1,6 +1,6 @@
class Rsvp < ActiveRecord::Base
- MAX_SEATS = 55
+ MAX_SEATS = 50
ATTENDEE_RANGE = (1..5).to_a.freeze
named_scope :reserved, :conditions => {:reserved => true}
View
5 app/stylesheets/site.sass
@@ -227,7 +227,7 @@ table.data_table
width: 160px
font-size: 14px
- .flash_good, .flash_bad, .flash_indif
+ .flash_good, .flash_bad, .flash_indif, .flash_alert
margin: 10px auto
padding: 10px 10px 10px 35px
color: #000
@@ -247,6 +247,9 @@ table.data_table
.flash_indif
border: 2px solid #06f
background: #9cf url('/images/layout/indif.png') no-repeat 8px 10px
+ .flash_alert
+ border: 2px solid yellow
+ background: #dec100 url('/images/layout/alert.png') no-repeat 8px 10px
#content_left
width = !content_lwidth - 40px * 2
View
2  app/views/layouts/application.html.haml
@@ -39,6 +39,8 @@
#content_right
#rsvp_stuff{:style => "display:#{current_rsvp && current_rsvp.reserved? ? 'none' : 'block'};"}
+ .flash_alert{:style => "display:#{Rsvp.open_seats? ? 'none' : 'block'};"}
+ All seats reserved! Use the RSVP form to be placed on the waiting list. Follow us on Twitter for updates.
#rsvp_button{:style => "display:#{current_rsvp && !current_rsvp.reserved? ? 'none' : 'block'};"}
.flash_indif{:style => "display:#{current_rsvp && !current_rsvp.reserved? && !session[:toggled_reservation] ? 'block' : 'none'};", :id => 'rsvp_flash_indif'}
Please verify your reservation by clicking the link contained in
View
BIN  public/images/layout/alert.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
9 test/integration/visitor_story_test.rb
@@ -47,10 +47,15 @@ def setup
assert_element_visible('div#rsvp_stuff')
assert_element_visible('div#rsvp_button')
assert_element_hidden('div#content_right div.flash_indif')
-
end
-
+ should 'Not see seats reserved message untill max seats have been reached' do
+ get_page :home
+ assert_element_hidden 'div#content_right div.flash_alert'
+ Rsvp.stubs(:open_seats? => false)
+ get_page :home
+ assert_element_visible 'div#content_right div.flash_alert'
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.