]> 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 783865a03dc724a806e94dec3c2ad91d5daf1818..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}}
@@ -13,7 +13,7 @@
     <td>{{this.rank_address}}</td>
     <td>{{formatAdminLevel this.admin_level}}</td>
     <td>{{formatDistance this.distance bDistanceInMeters}}</td>
-    <td>{{detailsPermaLink this 'details >'}}</td>
+    <td>{{#if this.osm_id}}<a href="{{detailsURL this}}">details</a>{{/if}}</td>
   </tr>
 {{/inline}}
 
@@ -40,7 +40,7 @@
     <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">
           <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 bDistanceInMeters=false}}
+              {{> 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 bDistanceInMeters=true}}
+              {{> 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 bDistanceInMeters=true}}
+                {{> partial_details_one_row bDistanceInMeters=true bAddressLineUsed=true}}
               {{/each}}
             {{/each}}
           {{else}}