Commit 1e4f68ac63df8d71ff8455353e0fba9c0b1fa77b
1 parent
35733cf4
Exists in
master
and in
29 other branches
Small fixes
Showing
3 changed files
with
5 additions
and
4 deletions
Show diff stats
app/controllers/public/search_controller.rb
@@ -90,7 +90,7 @@ class SearchController < PublicController | @@ -90,7 +90,7 @@ class SearchController < PublicController | ||
90 | month = (params[:month] ? params[:month].to_i : Date.today.month) | 90 | month = (params[:month] ? params[:month].to_i : Date.today.month) |
91 | day = (params[:day] ? params[:day].to_i : Date.today.day) | 91 | day = (params[:day] ? params[:day].to_i : Date.today.day) |
92 | date = build_date(params[:year], params[:month], params[:day]) | 92 | date = build_date(params[:year], params[:month], params[:day]) |
93 | - date_range = (date - 1.month)..(date + 1.month).at_end_of_month | 93 | + date_range = (date - 1.month).at_beginning_of_month..(date + 1.month).at_end_of_month |
94 | 94 | ||
95 | @selected_day = nil | 95 | @selected_day = nil |
96 | @events_of_the_day = [] | 96 | @events_of_the_day = [] |
app/views/search/_google_maps.rhtml
@@ -13,8 +13,8 @@ | @@ -13,8 +13,8 @@ | ||
13 | <script type='text/javascript'> | 13 | <script type='text/javascript'> |
14 | mapLoad(<%= GoogleMaps.initial_zoom.to_json %>); | 14 | mapLoad(<%= GoogleMaps.initial_zoom.to_json %>); |
15 | 15 | ||
16 | - <% @searches.each do |name,results| %> | ||
17 | - <% results.each do |item| %> | 16 | + <% @searches.each do |name,search| %> |
17 | + <% search[:results].each do |item| %> | ||
18 | <% if item.lat && item.lng %> | 18 | <% if item.lat && item.lng %> |
19 | mapPutMarker(<%= item.lat.to_json %>, <%= item.lng.to_json %>, <%= item.name.to_json %>, '<%= icon %>', | 19 | mapPutMarker(<%= item.lat.to_json %>, <%= item.lng.to_json %>, <%= item.name.to_json %>, '<%= icon %>', |
20 | '<%= url_for(:controller => :map_balloon, :action => name.to_s.singularize, :id => item.id) %>'); | 20 | '<%= url_for(:controller => :map_balloon, :action => name.to_s.singularize, :id => item.id) %>'); |
app/views/search/search_page.html.erb
1 | <%= search_page_title( @titles[@asset], @category ) %> | 1 | <%= search_page_title( @titles[@asset], @category ) %> |
2 | 2 | ||
3 | +<%= render :partial => 'search_form', :locals => { :hint => _("Type words about the %s you're looking for") % @asset.to_s.singularize } %> | ||
3 | <%= render :partial => 'results_header' %> | 4 | <%= render :partial => 'results_header' %> |
4 | 5 | ||
5 | <%= display_results(@asset) %> | 6 | <%= display_results(@asset) %> |
6 | <% if params[:display] != 'map' %> | 7 | <% if params[:display] != 'map' %> |
7 | - <%= pagination_links @searches[@asset] %> | 8 | + <%= pagination_links @searches[@asset][:results] %> |
8 | <% end %> | 9 | <% end %> |
9 | 10 | ||
10 | <div style="clear: both"></div> | 11 | <div style="clear: both"></div> |