]> git.openstreetmap.org Git - nominatim-ui.git/blob - src/templates/detailspage.hbs
version 1.2.2
[nominatim-ui.git] / src / templates / detailspage.hbs
1
2 {{#*inline "partial_details_one_row"}}
3   <tr class="{{#unless this.isaddress}}notused{{/unless}}">
4     <td class="name">
5       {{#if this.localname}}
6         {{this.localname}}
7       {{else}}
8         <span class="noname">No Name</span>
9       {{/if}}
10     </td>
11     <td>{{formatPlaceType this}}</td>
12     <td>{{osmLink this}}</td>
13     <td>{{this.rank_address}}</td>
14     <td>{{formatAdminLevel this.admin_level}}</td>
15     <td>{{formatDistance this.distance bDistanceInMeters}}</td>
16     <td>{{detailsPermaLink this 'details >'}}</td>
17   </tr>
18 {{/inline}}
19
20 {{#*inline "partial_details_keyword_one_row"}}
21   <tr>
22     <td>{{formatKeywordToken this.token}}</td>
23     {{#if this.id}}
24       <td>word id: {{this.id}}</td>
25     {{/if}}
26   </tr>
27 {{/inline}}
28
29
30 {{#*inline "partial_h2"}}
31   <tr class="all-columns"><td colspan="6"><h2>{{this}}</h2></td></tr>
32 {{/inline}}
33
34 {{#*inline "partial_h3"}}
35   <tr class="all-columns"><td colspan="6"><h3>{{this}}</h3></td></tr>
36 {{/inline}}
37
38 <div class="container">
39   <div class="row">
40     <div class="col-sm-10">
41       <h1>
42         {{aPlace.localname}}
43         <small>{{detailsPermaLink aPlace 'link to this page'}}</small>
44       </h1>
45     </div>
46     <div class="col-sm-2 text-right">
47       {{formatMapIcon aPlace}}
48     </div>
49   </div>
50   <div class="row">
51     <div class="col-md-6">
52       <table id="locationdetails" class="table table-striped">
53         <tr>
54           <td>Name</td>
55           <td>
56             {{#each aPlace.names}}
57               <div class="line">
58                 <span class="name">{{this}}</span> ({{@key}})
59               </div>
60             {{/each}}
61           </td>
62         </tr>
63         <tr>
64           <td>Type</td>
65           <td>{{aPlace.category}}:{{aPlace.type}}</td>
66         </tr>
67         <tr>
68           <td>Last Updated</td>
69           <td>{{aPlace.indexed_date}}</td>
70         </tr>
71         <tr>
72           <td>Admin Level</td>
73           <td>{{aPlace.admin_level}}</td>
74         </tr>
75         <tr>
76           <td>Rank</td>
77           <td>{{formatSearchRank aPlace.rank_search}}</td>
78         </tr>
79         {{#if aPlace.calculated_importance}}
80           <tr>
81             <td>Importance</td>
82             <td>
83               {{aPlace.calculated_importance}}
84               {{#unless aPlace.importance}} (estimated){{/unless}}
85             </td>
86           </tr>
87         {{/if}}
88         <tr>
89           <td>Coverage</td>
90           <td>{{coverageType aPlace}}</td>
91         </tr>
92         <tr>
93           <td>Centre Point (lat,lon)</td>
94           <td>
95             {{aPlace.centroid.coordinates.[1]}},{{aPlace.centroid.coordinates.[0]}}
96           </td>
97         </tr>
98         <tr>
99           <td>OSM</td>
100           <td>{{osmLink aPlace}}
101         </tr>
102         <tr>
103           <td>
104             Place Id
105             (<a href="https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id">on this server</a>)
106           </td>
107           <td>{{aPlace.place_id}}</td>
108         </tr>
109         {{#if aPlace.calculated_wikipedia}}
110           <tr>
111             <td>Wikipedia Calculated</td>
112             <td>{{wikipediaLink aPlace}}</td>
113           </tr>
114         {{/if}}
115         <tr>
116           <td>Computed Postcode</td>
117           <td>{{aPlace.calculated_postcode}}</td>
118         </tr>
119         <tr>
120           <td>Address Tags</td>
121           <td>
122             {{#each aPlace.addresstags}}
123               <div class="line">
124                 <span class="name">{{this}}</span> ({{@key}})
125               </div>
126             {{/each}}
127           </td>
128         </tr>
129         <tr>
130           <td>Extra Tags</td>
131           <td>
132             {{#each aPlace.extratags}}
133               <div class="line">
134                 <span class="name">{{this}}</span> ({{@key}})
135               </div>
136             {{/each}}
137           </td>
138         </tr>
139       </table>
140     </div>
141     <div class="col-md-6">
142       <div id="map"></div>
143     </div>
144   </div>
145   <div class="row">
146     <div class="col-md-12">
147       <h2>Address</h2>
148        <table id="address" class="table table-striped table-small">
149         <thead>
150           <tr>
151             <th>Local name</th>
152             <th>Type</th>
153             <th>OSM</th>
154             <th>Address rank</th>
155             <th>Admin level</th>
156             <th>Distance</th>
157             <th></th>
158           </tr>
159         </thead>
160         <tbody>
161           {{#if aPlace.address}}
162             {{#each aPlace.address}}
163               {{> partial_details_one_row bDistanceInMeters=false}}
164             {{/each}}
165           {{/if}}
166
167           {{#if aPlace.linked_places}}
168             {{> partial_h2 'Linked Places'}}
169             {{#each aPlace.linked_places}}
170               {{> partial_details_one_row bDistanceInMeters=true}}
171             {{/each}}
172           {{/if}}
173
174           {{#if aPlace.keywords}}
175             {{> partial_h2 'Name Keywords'}}
176             {{#each aPlace.keywords.name}}
177               {{> partial_details_keyword_one_row}}
178             {{/each}}
179
180             {{> partial_h2 'Address Keywords'}}
181             {{#each aPlace.keywords.address}}
182               {{> partial_details_keyword_one_row}}
183             {{/each}}
184           {{/if}}
185
186           {{> partial_h2 'Parent Of'}}
187           {{#if aPlace.hierarchy}}
188
189             {{#each aPlace.hierarchy as |lines type|}}
190               {{> partial_h3 type}}
191               {{#each lines}}
192                 {{> partial_details_one_row bDistanceInMeters=true}}
193               {{/each}}
194             {{/each}}
195           {{else}}
196             <tr>
197               <td>
198                 <a class="btn btn-outline-secondary btn-sm"
199                   href="{{base_url}}&hierarchy=1">display child places</a>
200               </td>
201             </tr>
202           {{/if}}
203           {{tooManyHierarchyLinesWarning aPlace}}
204         </tbody>
205       </table>
206     </div>
207   </div>
208 </div>
209