]> git.openstreetmap.org Git - nominatim-ui.git/commitdiff
show admin level only for admin boundaries
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 2 Dec 2020 15:29:44 +0000 (16:29 +0100)
committermtmail <mtmail@gmx.net>
Wed, 2 Dec 2020 16:42:51 +0000 (17:42 +0100)
dist/deletable.html
dist/details.html
dist/handlebar_helpers.js
dist/polygons.html
dist/reverse.html
dist/search.html
src/handlebar_helpers.js
src/templates/detailspage.hbs

index 14788099dfe9350b036451943e01d667066b3c73..16ebbc2415f9561f52f82ba771669aaf214a5aa5 100644 (file)
           <td>Last Updated</td>
           <td>{{aPlace.indexed_date}}</td>
         </tr>
           <td>Last Updated</td>
           <td>{{aPlace.indexed_date}}</td>
         </tr>
+        {{#if (isAdminBoundary aPlace) }}
         <tr>
           <td>Admin Level</td>
           <td>{{aPlace.admin_level}}</td>
         </tr>
         <tr>
           <td>Admin Level</td>
           <td>{{aPlace.admin_level}}</td>
         </tr>
+        {{/if}}
         <tr>
           <td>Search Rank</td>
           <td>{{aPlace.rank_search}}</td>
         <tr>
           <td>Search Rank</td>
           <td>{{aPlace.rank_search}}</td>
index 14788099dfe9350b036451943e01d667066b3c73..16ebbc2415f9561f52f82ba771669aaf214a5aa5 100644 (file)
           <td>Last Updated</td>
           <td>{{aPlace.indexed_date}}</td>
         </tr>
           <td>Last Updated</td>
           <td>{{aPlace.indexed_date}}</td>
         </tr>
+        {{#if (isAdminBoundary aPlace) }}
         <tr>
           <td>Admin Level</td>
           <td>{{aPlace.admin_level}}</td>
         </tr>
         <tr>
           <td>Admin Level</td>
           <td>{{aPlace.admin_level}}</td>
         </tr>
+        {{/if}}
         <tr>
           <td>Search Rank</td>
           <td>{{aPlace.rank_search}}</td>
         <tr>
           <td>Search Rank</td>
           <td>{{aPlace.rank_search}}</td>
index e07c3390142b2b47361a46f3f7f9e15c8bebe0c5..bbb6e16d2aa2fcccc6d16d75881ab1bab0c4a2b2 100644 (file)
@@ -251,6 +251,9 @@ Handlebars.registerHelper({
     if (iRank <= 30) return 'house / building';
     return 'other';
   },
     if (iRank <= 30) return 'house / building';
     return 'other';
   },
+  isAdminBoundary: function (aPlace) {
+    return aPlace.category === 'boundary' && aPlace.type === 'administrative';
+  },
   tooManyHierarchyLinesWarning: function (aPlace) {
     if (!aPlace.hierarchy) return '';
 
   tooManyHierarchyLinesWarning: function (aPlace) {
     if (!aPlace.hierarchy) return '';
 
index 14788099dfe9350b036451943e01d667066b3c73..16ebbc2415f9561f52f82ba771669aaf214a5aa5 100644 (file)
           <td>Last Updated</td>
           <td>{{aPlace.indexed_date}}</td>
         </tr>
           <td>Last Updated</td>
           <td>{{aPlace.indexed_date}}</td>
         </tr>
+        {{#if (isAdminBoundary aPlace) }}
         <tr>
           <td>Admin Level</td>
           <td>{{aPlace.admin_level}}</td>
         </tr>
         <tr>
           <td>Admin Level</td>
           <td>{{aPlace.admin_level}}</td>
         </tr>
+        {{/if}}
         <tr>
           <td>Search Rank</td>
           <td>{{aPlace.rank_search}}</td>
         <tr>
           <td>Search Rank</td>
           <td>{{aPlace.rank_search}}</td>
index 14788099dfe9350b036451943e01d667066b3c73..16ebbc2415f9561f52f82ba771669aaf214a5aa5 100644 (file)
           <td>Last Updated</td>
           <td>{{aPlace.indexed_date}}</td>
         </tr>
           <td>Last Updated</td>
           <td>{{aPlace.indexed_date}}</td>
         </tr>
+        {{#if (isAdminBoundary aPlace) }}
         <tr>
           <td>Admin Level</td>
           <td>{{aPlace.admin_level}}</td>
         </tr>
         <tr>
           <td>Admin Level</td>
           <td>{{aPlace.admin_level}}</td>
         </tr>
+        {{/if}}
         <tr>
           <td>Search Rank</td>
           <td>{{aPlace.rank_search}}</td>
         <tr>
           <td>Search Rank</td>
           <td>{{aPlace.rank_search}}</td>
index 14788099dfe9350b036451943e01d667066b3c73..16ebbc2415f9561f52f82ba771669aaf214a5aa5 100644 (file)
           <td>Last Updated</td>
           <td>{{aPlace.indexed_date}}</td>
         </tr>
           <td>Last Updated</td>
           <td>{{aPlace.indexed_date}}</td>
         </tr>
+        {{#if (isAdminBoundary aPlace) }}
         <tr>
           <td>Admin Level</td>
           <td>{{aPlace.admin_level}}</td>
         </tr>
         <tr>
           <td>Admin Level</td>
           <td>{{aPlace.admin_level}}</td>
         </tr>
+        {{/if}}
         <tr>
           <td>Search Rank</td>
           <td>{{aPlace.rank_search}}</td>
         <tr>
           <td>Search Rank</td>
           <td>{{aPlace.rank_search}}</td>
index e07c3390142b2b47361a46f3f7f9e15c8bebe0c5..bbb6e16d2aa2fcccc6d16d75881ab1bab0c4a2b2 100644 (file)
@@ -251,6 +251,9 @@ Handlebars.registerHelper({
     if (iRank <= 30) return 'house / building';
     return 'other';
   },
     if (iRank <= 30) return 'house / building';
     return 'other';
   },
+  isAdminBoundary: function (aPlace) {
+    return aPlace.category === 'boundary' && aPlace.type === 'administrative';
+  },
   tooManyHierarchyLinesWarning: function (aPlace) {
     if (!aPlace.hierarchy) return '';
 
   tooManyHierarchyLinesWarning: function (aPlace) {
     if (!aPlace.hierarchy) return '';
 
index 410f3c82f41baf20847f98df955cfb63dca22b81..85ad950f2ff862c918927cc7fb01e06479fd7010 100644 (file)
           <td>Last Updated</td>
           <td>{{aPlace.indexed_date}}</td>
         </tr>
           <td>Last Updated</td>
           <td>{{aPlace.indexed_date}}</td>
         </tr>
+        {{#if (isAdminBoundary aPlace) }}
         <tr>
           <td>Admin Level</td>
           <td>{{aPlace.admin_level}}</td>
         </tr>
         <tr>
           <td>Admin Level</td>
           <td>{{aPlace.admin_level}}</td>
         </tr>
+        {{/if}}
         <tr>
           <td>Search Rank</td>
           <td>{{aPlace.rank_search}}</td>
         <tr>
           <td>Search Rank</td>
           <td>{{aPlace.rank_search}}</td>