From 95e1f568b34b362ea5ff69c3c1a613611f547dd6 Mon Sep 17 00:00:00 2001 From: marc tobias Date: Thu, 20 Feb 2020 18:25:26 +0100 Subject: [PATCH] details page: in addressline table for details link use osm type and ids --- src/handlebar_helpers.js | 7 ++++++- src/templates/detailspage.hbs | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/handlebar_helpers.js b/src/handlebar_helpers.js index b4589ed..a1872f0 100644 --- a/src/handlebar_helpers.js +++ b/src/handlebar_helpers.js @@ -66,8 +66,13 @@ Handlebars.registerHelper({ var sTitleEscaped = Handlebars.escapeExpression(sTitle || sOSMType + ' ' + aFeature.osm_id); + var sURL = 'details.html?osmtype=' + aFeature.osm_type + '&osmid=' + aFeature.osm_id; + if (aFeature.category) { + sURL = sURL + '&class=' + aFeature.category; + } + return new Handlebars.SafeString( - '' + sTitleEscaped + '' + '' + sTitleEscaped + '' ); }, coverageType: function (aPlace) { diff --git a/src/templates/detailspage.hbs b/src/templates/detailspage.hbs index 67b9f8c..a4e510c 100644 --- a/src/templates/detailspage.hbs +++ b/src/templates/detailspage.hbs @@ -13,7 +13,7 @@ {{this.rank_address}} {{formatAdminLevel this.admin_level}} {{formatDistance this.distance}} - {{detailsLink this null}} + {{detailsPermaLink this 'details >'}} {{/inline}} -- 2.39.5