X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/5aa09fbfd069faf1eb04d4be201a6a1f1eca6cd9..14bc538681ca1e6b54dc2da67718e67ea6e1ec04:/app/views/layouts/_head.html.erb diff --git a/app/views/layouts/_head.html.erb b/app/views/layouts/_head.html.erb index 133a746a8..c85594189 100644 --- a/app/views/layouts/_head.html.erb +++ b/app/views/layouts/_head.html.erb @@ -11,6 +11,9 @@ <%= tag("link", { :rel => "publisher", :href => "https://plus.google.com/111953119785824514010" }) %> <%= tag("link", { :rel => "search", :type => "application/opensearchdescription+xml", :title => "OpenStreetMap Search", :href => asset_path("osm.xml") }) %> <%= tag("meta", { :name => "description", :content => "OpenStreetMap is the free wiki world map." }) %> + <% if flash[:piwik_goal] -%> + <%= tag("meta", :name => "piwik-goal", :content => flash[:piwik_goal]) %> + <% end -%> <%= style_rules %> <%= yield :head %> <%= csrf_meta_tag %> @@ -18,6 +21,16 @@ I18n.defaultLocale = "<%= I18n.default_locale %>"; I18n.locale = "<%= I18n.locale %>"; I18n.fallbacks = true; + + <% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %> + OSM.home = <%= { :lat => @user.home_lat, :lon => @user.home_lon }.to_json.html_safe %>; + <% end %> + + <% if session[:location] %> + OSM.location = <%= session[:location].to_json.html_safe %>; + <% end %> + + OSM.preferred_editor = <%= preferred_editor.to_json.html_safe %>;