X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/237394bc3901bd0411bd3c10b0a994e6af7b1440..599843c72db1f519daa085de69a19d9aa77332e2:/app/views/site/index.html.erb diff --git a/app/views/site/index.html.erb b/app/views/site/index.html.erb index 31834bf7c..84ffcbe59 100644 --- a/app/views/site/index.html.erb +++ b/app/views/site/index.html.erb @@ -17,24 +17,23 @@
+
- -
- - + + -
<%= t'site.index.license.license_url' %><%= t'site.index.license.project_url' %><%= t'site.index.license.license_url' %><%= t'site.index.license.project_url' %>
<%= + <%= t'site.index.license.notice', :license_name => t('site.index.license.license_name'), :project_name => t('site.index.license.project_name') @@ -66,18 +65,17 @@ if params['node'] or params['way'] or params['relation'] end end +# Decide on a lat lon to initialise the map with. Various ways of doing this if params['minlon'] and params['minlat'] and params['maxlon'] and params['maxlat'] bbox = true minlon = h(params['minlon']) minlat = h(params['minlat']) maxlon = h(params['maxlon']) maxlat = h(params['maxlat']) + layers = h(params['layers']) box = true if params['box']=="yes" object_zoom = false -end - -# Decide on a lat lon to initialise the map with. Various ways of doing this -if params['lon'] and params['lat'] +elsif params['lon'] and params['lat'] lon = h(params['lon']) lat = h(params['lat']) zoom = h(params['zoom'] || '5') @@ -96,7 +94,9 @@ elsif @user and !@user.home_lon.nil? and !@user.home_lat.nil? lat = @user.home_lat zoom = '10' else - session[:location] = OSM::IPLocation(request.env['REMOTE_ADDR']) unless session[:location] + unless STATUS == :database_readonly or STATUS == :database_offline + session[:location] = OSM::IPLocation(request.env['REMOTE_ADDR']) unless session[:location] + end if session[:location] bbox = true @@ -118,9 +118,9 @@ end <%= javascript_include_tag '/openlayers/OpenStreetMap.js' %> <%= javascript_include_tag 'map.js' %> +<%= render :partial => 'resize' %> +