From 04224d9aa3b35e5adc455fde1cc081cf3d4c94bd Mon Sep 17 00:00:00 2001 From: marc tobias Date: Tue, 4 Feb 2020 00:29:28 +0100 Subject: [PATCH 1/1] details html page: no longer use place_id in URLs --- dist/details.html | 4 ++++ dist/detailspage.hbs | 4 ++++ dist/handlebar_helpers.js | 6 ++++++ dist/search.html | 2 +- dist/searchpage.hbs | 2 +- src/handlebar_helpers.js | 6 ++++++ src/templates/detailspage.hbs | 4 ++++ src/templates/searchpage.hbs | 2 +- 8 files changed, 27 insertions(+), 3 deletions(-) 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}} -- 2.45.2