]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - src/templates/detailspage.hbs
show admin level only for admin boundaries
[nominatim-ui.git] / src / templates / detailspage.hbs
index 1b394324b91ddc82b7483ee3b4549f2d692966ed..85ad950f2ff862c918927cc7fb01e06479fd7010 100644 (file)
@@ -1,6 +1,6 @@
 
 {{#*inline "partial_details_one_row"}}
-  <tr class="{{#unless this.isaddress}}notused{{/unless}}">
+  <tr class="{{#unless bAddressLineUsed}}notused{{/unless}}">
     <td class="name">
       {{#if this.localname}}
         {{this.localname}}
@@ -12,8 +12,8 @@
     <td>{{osmLink this}}</td>
     <td>{{this.rank_address}}</td>
     <td>{{formatAdminLevel this.admin_level}}</td>
-    <td>{{formatDistance this.distance}}</td>
-    <td>{{detailsPermaLink this 'details >'}}</td>
+    <td>{{formatDistance this.distance bDistanceInMeters}}</td>
+    <td>{{#if this.osm_id}}<a href="{{detailsURL this}}">details</a>{{/if}}</td>
   </tr>
 {{/inline}}
 
     <div class="col-sm-10">
       <h1>
         {{aPlace.localname}}
-        <small>{{detailsPermaLink aPlace 'link to this page'}}</small>
+        <small><a href="{{detailsURL aPlace}}">link to this page</a></small>
       </h1>
     </div>
     <div class="col-sm-2 text-right">
-      {{formatMapIcon aPlace.icon}}
+      {{formatMapIcon aPlace}}
     </div>
   </div>
   <div class="row">
           <td>Last Updated</td>
           <td>{{aPlace.indexed_date}}</td>
         </tr>
+        {{#if (isAdminBoundary aPlace) }}
         <tr>
           <td>Admin Level</td>
           <td>{{aPlace.admin_level}}</td>
         </tr>
+        {{/if}}
+        <tr>
+          <td>Search Rank</td>
+          <td>{{aPlace.rank_search}}</td>
+        </tr>
         <tr>
-          <td>Rank</td>
-          <td>{{formatSearchRank aPlace.rank_search}}</td>
+          <td>Address Rank</td>
+          <td>{{aPlace.rank_address}} ({{formatAddressRank aPlace.rank_address}})</td>
         </tr>
         {{#if aPlace.calculated_importance}}
           <tr>
         <tbody>
           {{#if aPlace.address}}
             {{#each aPlace.address}}
-              {{> partial_details_one_row}}
+              {{> partial_details_one_row bDistanceInMeters=false bAddressLineUsed=this.isaddress}}
             {{/each}}
           {{/if}}
 
           {{#if aPlace.linked_places}}
             {{> partial_h2 'Linked Places'}}
             {{#each aPlace.linked_places}}
-              {{> partial_details_one_row}}
+              {{> partial_details_one_row bDistanceInMeters=true bAddressLineUsed=true}}
             {{/each}}
           {{/if}}
 
             {{#each aPlace.hierarchy as |lines type|}}
               {{> partial_h3 type}}
               {{#each lines}}
-                {{> partial_details_one_row}}
+                {{> partial_details_one_row bDistanceInMeters=true bAddressLineUsed=true}}
               {{/each}}
             {{/each}}
           {{else}}