]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - src/templates/detailspage.hbs
default to localhost
[nominatim-ui.git] / src / templates / detailspage.hbs
index 8328f1ce14cb9e86eadf0bc7065e2ceb7bb9fae0..6fa2886efd921e142c0c763d4c4a546a25a1a4f0 100644 (file)
 
 {{#*inline "partial_details_one_row"}}
-    <tr class="{{isaddresses_unused this}}">
-        <td class="name">
-            {{#if this.localname}}
-                {{this.localname}}
-            {{else}}
-                <span class="noname">No Name</span>
-            {{/if}}
-        </td>
-        <td>{{this.class}}:{{this.type}}</td>
-        <td>{{osmLink this}}</td>
-        <td>{{this.rank_address}}</td>
-        <td>{{formatAdminLevel this.admin_level}}</td>
-        <td>{{formatDistance this.distance}}</td>
-        <td>{{detailsLink this null}}</td>
-    </tr>
+  <tr class="{{isaddresses_unused this}}">
+    <td class="name">
+      {{#if this.localname}}
+        {{this.localname}}
+      {{else}}
+        <span class="noname">No Name</span>
+      {{/if}}
+    </td>
+    <td>{{this.class}}:{{this.type}}</td>
+    <td>{{osmLink this}}</td>
+    <td>{{this.rank_address}}</td>
+    <td>{{formatAdminLevel this.admin_level}}</td>
+    <td>{{formatDistance this.distance}}</td>
+    <td>{{detailsLink this null}}</td>
+  </tr>
 {{/inline}}
 
 {{#*inline "partial_details_keyword_one_row"}}
-    <tr>
-        <td>{{formatKeywordToken this.token}}</td>
-        {{#if this.id}}
-            <td>word id: {{this.id}}</td>
-        {{/if}}
-    </tr>
+  <tr>
+    <td>{{formatKeywordToken this.token}}</td>
+    {{#if this.id}}
+      <td>word id: {{this.id}}</td>
+    {{/if}}
+  </tr>
 {{/inline}}
 
 
 {{#*inline "partial_h2"}}
-    <tr class="all-columns"><td colspan="6"><h2>{{this}}</h2></td></tr>
+  <tr class="all-columns"><td colspan="6"><h2>{{this}}</h2></td></tr>
 {{/inline}}
 
 {{#*inline "partial_h3"}}
-    <tr class="all-columns"><td colspan="6"><h3>{{this}}</h3></td></tr>
+  <tr class="all-columns"><td colspan="6"><h3>{{this}}</h3></td></tr>
 {{/inline}}
 
 <div class="container">
-    <div class="row">
-        <div class="col-sm-10">
-            <h1>{{aPlace.localname}} <small>{{detailsPermaLink aPlace 'link to this page'}}</small></h1>
-        </div>
-        <div class="col-sm-2 text-right">
-            {{formatMapIcon aPlace.icon}}
-        </div>
+  <div class="row">
+    <div class="col-sm-10">
+      <h1>{{aPlace.localname}} <small>{{detailsPermaLink aPlace 'link to this page'}}</small></h1>
+    </div>
+    <div class="col-sm-2 text-right">
+      {{formatMapIcon aPlace.icon}}
+    </div>
+  </div>
+  <div class="row">
+    <div class="col-md-6">
+      <table id="locationdetails" class="table table-striped">
+        <tr>
+          <td>Name</td>
+          <td>
+            {{#each aPlace.names}}
+              <div class="line"><span class="name">{{this}}</span> ({{@key}})</div>
+            {{/each}}
+          </td>
+        </tr>
+        <tr>
+          <td>Type</td>
+          <td>{{aPlace.category}}:{{aPlace.type}}</td>
+        </tr>
+        <tr>
+          <td>Last Updated</td>
+          <td>{{aPlace.indexed_date}}</td>
+        </tr>
+        <tr>
+          <td>Admin Level</td>
+          <td>{{aPlace.admin_level}}</td>
+        </tr>
+        <tr>
+          <td>Rank</td>
+          <td>{{formatSearchRank aPlace.rank_search}}</td>
+        </tr>
+        {{#if aPlace.calculated_importance}}
+          <tr>
+            <td>Importance</td>
+            <td>
+              {{aPlace.calculated_importance}}
+              {{#unless aPlace.importance}} (estimated){{/unless}}
+            </td>
+          </tr>
+        {{/if}}
+        <tr>
+          <td>Coverage</td>
+          <td>{{coverageType aPlace}}</td>
+        </tr>
+        <tr>
+          <td>Centre Point (lat,lon)</td>
+          <td>{{aPlace.centroid.coordinates.[1]}},{{aPlace.centroid.coordinates.[0]}}</td>
+        </tr>
+        <tr>
+          <td>OSM</td>
+          <td>{{osmLink aPlace}}
+        </tr>
+        {{#if aPlace.calculated_wikipedia}}
+          <tr>
+            <td>Wikipedia Calculated</td>
+            <td>{{wikipediaLink aPlace}}</td>
+          </tr>
+        {{/if}}
+        <tr>
+          <td>Computed Postcode</td>
+          <td>{{aPlace.calculated_postcode}}</td>
+        </tr>
+        <tr>
+          <td>Address Tags</td>
+          <td>
+            {{#each aPlace.addresstags}}
+              <div class="line"><span class="name">{{this}}</span> ({{@key}})</div>
+            {{/each}}
+          </td>
+        </tr>
+        <tr>
+          <td>Extra Tags</td>
+          <td>
+            {{#each aPlace.extratags}}
+              <div class="line"><span class="name">{{this}}</span> ({{@key}})</div>
+            {{/each}}
+          </td>
+        </tr>
+      </table>
     </div>
-    <div class="row">
-        <div class="col-md-6">
-            <table id="locationdetails" class="table table-striped">
-                <tr>
-                    <td>Name</td>
-                    <td>
-                        {{#each aPlace.names}}
-                            <div class="line"><span class="name">{{this}}</span> ({{@key}})</div>
-                        {{/each}}
-                    </td>
-                </tr>
-                <tr>
-                    <td>Type</td>
-                    <td>{{aPlace.category}}:{{aPlace.type}}</td>
-                </tr>
-                <tr>
-                    <td>Last Updated</td>
-                    <td>{{aPlace.indexed_date}}</td>
-                </tr>
-                <tr>
-                    <td>Admin Level</td>
-                    <td>{{aPlace.admin_level}}</td>
-                </tr>
-                <tr>
-                    <td>Rank</td>
-                    <td>{{aPlace.rank_search_label}}</td>
-                </tr>
-                {{#if aPlace.calculated_importance}}
-                    <tr>
-                        <td>Importance</td>
-                        <td>
-                            {{aPlace.calculated_importance}}
-                            {{#unless aPlace.importance}} (estimated){{/unless}}
-                        </td>
-                    </tr>
-                {{/if}}
-                <tr>
-                    <td>Coverage</td>
-                    <td>{{coverageType aPlace}}</td>
-                </tr>
-                <tr>
-                    <td>Centre Point</td>
-                    <td>{{aPlace.lat}},{{aPlace.lon}}</td>
-                </tr>
-                <tr>
-                    <td>OSM</td>
-                    <td>{{osmLink aPlace}}
-                </tr>
-                {{#if aPlace.calculated_wikipedia}}
-                    <tr>
-                        <td>Wikipedia Calculated</td>
-                        <td>{{wikipediaLink aPlace}}</td>
-                    </tr>
-                {{/if}}
-                <tr>
-                    <td>Computed Postcode</td>
-                    <td>{{aPlace.calculated_postcode}}</td>
-                </tr>
-                <tr>
-                    <td>Address Tags</td>
-                    <td>
-                        {{#each aPlace.addresstags}}
-                            <div class="line"><span class="name">{{this}}</span> ({{@key}})</div>
-                        {{/each}}
-                    </td>
-                </tr>
-                <tr>
-                    <td>Extra Tags</td>
-                    <td>
-                        {{#each aPlace.extratags}}
-                            <div class="line"><span class="name">{{this}}</span> ({{@key}})</div>
-                        {{/each}}
-                    </td>
-                </tr>
-            </table>
-        </div>
-        <div class="col-md-6">
-            <div id="map"></div>
-        </div>
+    <div class="col-md-6">
+      <div id="map"></div>
     </div>
-    <div class="row">
-        <div class="col-md-12">
-            <h2>Address</h2>
-             <table id="address" class="table table-striped table-responsive">
-                <thead>
-                    <tr>
-                      <th>Local name</th>
-                      <th>Type</th>
-                      <th>OSM</th>
-                      <th>Address rank</th>
-                      <th>Admin level</th>
-                      <th>Distance</th>
-                      <th></th>
-                    </tr>
-                </thead>
-                <tbody>
-                    {{#if aPlace.address}}
-                        {{#each aPlace.address}}
-                            {{> partial_details_one_row}}
-                        {{/each}}
-                    {{/if}}
+  </div>
+  <div class="row">
+    <div class="col-md-12">
+      <h2>Address</h2>
+       <table id="address" class="table table-striped table-responsive">
+        <thead>
+          <tr>
+            <th>Local name</th>
+            <th>Type</th>
+            <th>OSM</th>
+            <th>Address rank</th>
+            <th>Admin level</th>
+            <th>Distance</th>
+            <th></th>
+          </tr>
+        </thead>
+        <tbody>
+          {{#if aPlace.address}}
+            {{#each aPlace.address}}
+              {{> partial_details_one_row}}
+            {{/each}}
+          {{/if}}
 
-                    {{#if aPlace.linked_places}}
-                        {{> partial_h2 'Linked Places'}}
-                        {{#each aPlace.linked_places}}
-                            {{> partial_details_one_row}}
-                        {{/each}}
-                    {{/if}}
+          {{#if aPlace.linked_places}}
+            {{> partial_h2 'Linked Places'}}
+            {{#each aPlace.linked_places}}
+              {{> partial_details_one_row}}
+            {{/each}}
+          {{/if}}
 
-                    {{#if aPlace.keywords}}
-                        {{> partial_h2 'Name Keywords'}}
-                        {{#each aPlace.keywords.name}}
-                            {{> partial_details_keyword_one_row}}
-                        {{/each}}
+          {{#if aPlace.keywords}}
+            {{> partial_h2 'Name Keywords'}}
+            {{#each aPlace.keywords.name}}
+              {{> partial_details_keyword_one_row}}
+            {{/each}}
 
-                        {{> partial_h2 'Address Keywords'}}
-                        {{#each aPlace.keywords.address}}
-                            {{> partial_details_keyword_one_row}}
-                        {{/each}}
-                    {{/if}}
+            {{> partial_h2 'Address Keywords'}}
+            {{#each aPlace.keywords.address}}
+              {{> partial_details_keyword_one_row}}
+            {{/each}}
+          {{/if}}
 
-                    {{#if aPlace.hierarchy}}
-                        {{> partial_h2 'Parent Of'}}
+          {{#if aPlace.hierarchy}}
+            {{> partial_h2 'Parent Of'}}
 
-                        {{#each aPlace.hierarchy as |lines type|}}
-                            {{> partial_h3 type}}
-                            {{#each lines}}
-                                {{> partial_details_one_row}}
-                            {{/each}}
-                        {{/each}}
-                    {{/if}}
-                    {{tooManyHierarchyLinesWarning aPlace}}
-                </tbody>
-            </table>
-        </div>
+            {{#each aPlace.hierarchy as |lines type|}}
+              {{> partial_h3 type}}
+              {{#each lines}}
+                {{> partial_details_one_row}}
+              {{/each}}
+            {{/each}}
+          {{/if}}
+          {{tooManyHierarchyLinesWarning aPlace}}
+        </tbody>
+      </table>
     </div>
+  </div>
 </div>