]> git.openstreetmap.org Git - nominatim-ui.git/commitdiff
details page: addressline.isaddress is a boolean, not t/f string
authormarc tobias <mtmail@gmx.net>
Tue, 7 Apr 2020 13:10:25 +0000 (15:10 +0200)
committermarc tobias <mtmail@gmx.net>
Tue, 7 Apr 2020 13:10:25 +0000 (15:10 +0200)
dist/details.html
dist/detailspage.hbs
dist/handlebar_helpers.js
src/handlebar_helpers.js
src/templates/detailspage.hbs

index 711e35e14e75947e10bf94320dc3eae31f67fb5e..0267b5f5d0a03929d3ca280943787fe8ccd0b8c4 100644 (file)
 <script id="detailspage-template" type="text/x-handlebars-template">
 
 {{#*inline "partial_details_one_row"}}
-  <tr class="{{isaddresses_unused this}}">
+  <tr class="{{#unless this.isaddress}}notused{{/unless}}">
     <td class="name">
       {{#if this.localname}}
         {{this.localname}}
index e93e875fa0217fa00c789ef0954c57e8174a9ab7..b1029b0bfce126fa1035ea61d947c436c38d161a 100644 (file)
@@ -1,6 +1,6 @@
 
 {{#*inline "partial_details_one_row"}}
-  <tr class="{{isaddresses_unused this}}">
+  <tr class="{{#unless this.isaddress}}notused{{/unless}}">
     <td class="name">
       {{#if this.localname}}
         {{this.localname}}
index d96923f2cc2e8994657b66c7833c4d323561cdc5..7af3384df441c4818086e8d270bf6c2555ef7aa4 100644 (file)
@@ -20,9 +20,6 @@ Handlebars.registerHelper({
     if (sType === 'relation') return 'R';
     return '';
   },
-  isaddresses_unused: function (aAddressLine) {
-    return ((aAddressLine.isaddress && aAddressLine.isaddress === 'f') ? 'notused' : '');
-  },
   // { osm_type: 'R', osm_id: 12345 }
   // <a href="https://www.openstreetmap.org/relation/12345">relation 12345</a
   osmLink: function (aPlace) {
index d96923f2cc2e8994657b66c7833c4d323561cdc5..7af3384df441c4818086e8d270bf6c2555ef7aa4 100644 (file)
@@ -20,9 +20,6 @@ Handlebars.registerHelper({
     if (sType === 'relation') return 'R';
     return '';
   },
-  isaddresses_unused: function (aAddressLine) {
-    return ((aAddressLine.isaddress && aAddressLine.isaddress === 'f') ? 'notused' : '');
-  },
   // { osm_type: 'R', osm_id: 12345 }
   // <a href="https://www.openstreetmap.org/relation/12345">relation 12345</a
   osmLink: function (aPlace) {
index e93e875fa0217fa00c789ef0954c57e8174a9ab7..b1029b0bfce126fa1035ea61d947c436c38d161a 100644 (file)
@@ -1,6 +1,6 @@
 
 {{#*inline "partial_details_one_row"}}
-  <tr class="{{isaddresses_unused this}}">
+  <tr class="{{#unless this.isaddress}}notused{{/unless}}">
     <td class="name">
       {{#if this.localname}}
         {{this.localname}}