Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unless @city.schools.empty?
- display = :find_school
- page.hide :find_school_error, :suggest_school
- page << update_select_box('school_school', @city.schools, { :text => :name })
- page.replace_html 'suggest_school', "<strong>Don't see your school here?</strong> Sorry about that! Our database is still growing, so please take a moment to " + link_to('suggest it', :controller => 'school', :action => 'suggest', :city_id => @city.id) + '! School suggestions are usually reviewed within 24 hours and only take a minute to submit!'
- else
- display = :find_school_error
- page.hide :find_school
- page.replace_html 'find_school_error', "Sorry, but the we do not have any schools in our database for that city yet. To get started, simply head on over to the <strong>" + link_to('suggest school', :controller => 'school', :action => 'suggest', :city_id => @city.id) + "</strong> page and submit your school. It only takes a moment, and your school's new homepage will be up and running in no time!"
- end
- page.visual_effect :appear, display
- page.visual_effect :highlight, display,
- :duration => 2
Add Comment
Please, Sign In to add comment