From: marc tobias Date: Mon, 3 Feb 2020 23:29:28 +0000 (+0100) Subject: details html page: no longer use place_id in URLs X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/commitdiff_plain/04224d9aa3b35e5adc455fde1cc081cf3d4c94bd details html page: no longer use place_id in URLs --- diff --git a/dist/details.html b/dist/details.html index d3c22a6..deaa979 100644 --- a/dist/details.html +++ b/dist/details.html @@ -208,6 +208,10 @@ OSM {{osmLink aPlace}} + + Place Id (on this server) + {{aPlace.place_id}} + {{#if aPlace.calculated_wikipedia}} Wikipedia Calculated diff --git a/dist/detailspage.hbs b/dist/detailspage.hbs index 6fa2886..67b9f8c 100644 --- a/dist/detailspage.hbs +++ b/dist/detailspage.hbs @@ -92,6 +92,10 @@ OSM {{osmLink aPlace}} + + Place Id (on this server) + {{aPlace.place_id}} + {{#if aPlace.calculated_wikipedia}} Wikipedia Calculated diff --git a/dist/handlebar_helpers.js b/dist/handlebar_helpers.js index 6443d37..3ef3a66 100644 --- a/dist/handlebar_helpers.js +++ b/dist/handlebar_helpers.js @@ -12,6 +12,12 @@ function formatOSMType(sType, bExcludeExternal) { } Handlebars.registerHelper({ + shortOSMType: function(sType) { + if (sType === 'node') return 'N'; + if (sType === 'way') return 'W'; + if (sType === 'relation') return 'R'; + return ''; + }, isaddresses_unused: function (aAddressLine) { return ((aAddressLine.isaddress && aAddressLine.isaddress === 'f') ? 'notused' : ''); }, diff --git a/dist/search.html b/dist/search.html index 5b2efc1..0d0b7e8 100644 --- a/dist/search.html +++ b/dist/search.html @@ -125,7 +125,7 @@ ({{formatLabel aResult}})

{{aResult.lat}},{{aResult.lon}}

- details + details {{/inline}} diff --git a/dist/searchpage.hbs b/dist/searchpage.hbs index 40ba59b..ff2d884 100644 --- a/dist/searchpage.hbs +++ b/dist/searchpage.hbs @@ -9,7 +9,7 @@ ({{formatLabel aResult}})

{{aResult.lat}},{{aResult.lon}}

- details + details {{/inline}} diff --git a/src/handlebar_helpers.js b/src/handlebar_helpers.js index 6443d37..3ef3a66 100644 --- a/src/handlebar_helpers.js +++ b/src/handlebar_helpers.js @@ -12,6 +12,12 @@ function formatOSMType(sType, bExcludeExternal) { } Handlebars.registerHelper({ + shortOSMType: function(sType) { + if (sType === 'node') return 'N'; + if (sType === 'way') return 'W'; + if (sType === 'relation') return 'R'; + return ''; + }, isaddresses_unused: function (aAddressLine) { return ((aAddressLine.isaddress && aAddressLine.isaddress === 'f') ? 'notused' : ''); }, diff --git a/src/templates/detailspage.hbs b/src/templates/detailspage.hbs index 6fa2886..67b9f8c 100644 --- a/src/templates/detailspage.hbs +++ b/src/templates/detailspage.hbs @@ -92,6 +92,10 @@ OSM {{osmLink aPlace}} + + Place Id (on this server) + {{aPlace.place_id}} + {{#if aPlace.calculated_wikipedia}} Wikipedia Calculated diff --git a/src/templates/searchpage.hbs b/src/templates/searchpage.hbs index 40ba59b..ff2d884 100644 --- a/src/templates/searchpage.hbs +++ b/src/templates/searchpage.hbs @@ -9,7 +9,7 @@ ({{formatLabel aResult}})

{{aResult.lat}},{{aResult.lon}}

- details + details {{/inline}}