From: Tom Hughes Date: Sun, 7 Jul 2024 09:45:39 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/pull/4960' X-Git-Tag: live~468 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/2061b5c257f9f22253f55946d43ee97d15c2c67c?hp=4e01f6830a335df4a5ba4420033f60cf0c9c7464 Merge remote-tracking branch 'upstream/pull/4960' --- diff --git a/app/assets/javascripts/index/contextmenu.js b/app/assets/javascripts/index/contextmenu.js index cac5e6fbf..ffc0eadb7 100644 --- a/app/assets/javascripts/index/contextmenu.js +++ b/app/assets/javascripts/index/contextmenu.js @@ -51,7 +51,7 @@ OSM.initializeContextMenu = function (map) { lat = latlng.lat.toFixed(precision), lng = latlng.lng.toFixed(precision); - OSM.router.route("/search?whereami=1&query=" + encodeURIComponent(lat + "," + lng)); + OSM.router.route("/search?lat=" + encodeURIComponent(lat) + "&lon=" + encodeURIComponent(lng)); } }); diff --git a/app/assets/javascripts/index/search.js b/app/assets/javascripts/index/search.js index 94bb52a1b..2f3882e3a 100644 --- a/app/assets/javascripts/index/search.js +++ b/app/assets/javascripts/index/search.js @@ -33,10 +33,11 @@ OSM.Search = function (map) { $(".describe_location").on("click", function (e) { e.preventDefault(); var center = map.getCenter().wrap(), - precision = OSM.zoomPrecision(map.getZoom()); - OSM.router.route("/search?whereami=1&query=" + encodeURIComponent( - center.lat.toFixed(precision) + "," + center.lng.toFixed(precision) - )); + precision = OSM.zoomPrecision(map.getZoom()), + lat = center.lat.toFixed(precision), + lng = center.lng.toFixed(precision); + + OSM.router.route("/search?lat=" + encodeURIComponent(lat) + "&lon=" + encodeURIComponent(lng)); }); $("#sidebar_content") diff --git a/app/controllers/geocoder_controller.rb b/app/controllers/geocoder_controller.rb index ee3c3479c..8ec0ab6b7 100644 --- a/app/controllers/geocoder_controller.rb +++ b/app/controllers/geocoder_controller.rb @@ -221,7 +221,7 @@ class GeocoderController < ApplicationController elsif latlon = query.match(%r{^([+-]?\d+(\.\d*)?)(?:\s+|\s*[,/]\s*)([+-]?\d+(\.\d*)?)$}) params.merge!(:lat => latlon[1].to_f, :lon => latlon[3].to_f).delete(:query) - params[:latlon_digits] = true unless params[:whereami] + params[:latlon_digits] = true end end diff --git a/app/views/application/_auth_providers.html.erb b/app/views/application/_auth_providers.html.erb index be921ee9c..66417bca2 100644 --- a/app/views/application/_auth_providers.html.erb +++ b/app/views/application/_auth_providers.html.erb @@ -26,7 +26,7 @@ <% end %> <%= link_to image_tag("openid.svg", - :alt => t("application.auth_providers.openid.title"), + :alt => t("application.auth_providers.openid.alt"), :size => "36"), "#", :id => "openid_open_url", diff --git a/app/views/users/blocked.html.erb b/app/views/users/blocked.html.erb index a97d9ba8d..9776136a8 100644 --- a/app/views/users/blocked.html.erb +++ b/app/views/users/blocked.html.erb @@ -1,7 +1,7 @@ <% content_for :heading_class, "p-0 mw-100" %> <% content_for :heading do %>
-