Permalink
Browse files

Added flash message for new cities notifying user that initial data c…

…an take a few hours to appear.
  • Loading branch information...
1 parent 32df3b3 commit 40d9d35a5017bf6c4b317ca720c33bbfa5b0f6bf @paulmwatson paulmwatson committed Apr 1, 2009
Showing with 12 additions and 1 deletion.
  1. +1 −1 app/controllers/cities_controller.rb
  2. +1 −0 app/views/phrases/index.html.erb
  3. +10 −0 public/stylesheets/main.css
@@ -39,8 +39,8 @@ def create
@city = City.new(params[:city])
@city.save
expire_page :controller => '/', :action => :index
+ flash[:notice] = "We have added #{@city.name} to SickCity. It can take a few hours for the first results to show up though, please be patient."
end
- flash[:notice] = 'City was successfully created.'
redirect_to "/#{@city.country.gsub(' ', '%20')}/#{@city.name.gsub(' ', '%20')}"
end
@@ -1,6 +1,7 @@
<div class="intro info">
<h2><%= @city.name %></h2>
<p>Realtime disease detection <a href="http://diycity.org/sickcity-realtime-disease-detection-your-city">by DIYCity</a></p>
+ <%= "<p class=\"notice\">#{flash[:notice]}</p>" if flash[:notice] %>
</div>
<ul class="list">
<% @phrases.each do |phrase|%>
@@ -351,4 +351,14 @@ input[type='submit']
.toptencount
{
color: #c00;
+}
+
+p.notice
+{
+ background-color: #fff;
+ color: #c00;
+ font-size: larger;
+ margin-top: 10px;
+ padding: 5px;
+ -moz-border-radius: 3px;
}

0 comments on commit 40d9d35

Please sign in to comment.