]> git.openstreetmap.org Git - nominatim-ui.git/blob - src/templates/detailspage.hbs
d572eaa1320497f26490e6e3131eefbe462534f1
[nominatim-ui.git] / src / templates / detailspage.hbs
1
2 {{#*inline "partial_details_one_row"}}
3   <tr class="{{#unless bAddressLineUsed}}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>{{#if this.osm_id}}<a href="{{detailsURL this}}">details</a>{{/if}}</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><a href="{{detailsURL aPlace}}">link to this page</a></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         {{#if (isAdminBoundary aPlace) }}
72         <tr>
73           <td>Admin Level</td>
74           <td>{{aPlace.admin_level}}</td>
75         </tr>
76         {{/if}}
77         <tr>
78           <td>Search Rank</td>
79           <td>{{aPlace.rank_search}}</td>
80         </tr>
81         <tr>
82           <td>Address Rank</td>
83           <td>{{aPlace.rank_address}} ({{formatAddressRank aPlace.rank_address}})</td>
84         </tr>
85         {{#if aPlace.calculated_importance}}
86           <tr>
87             <td>Importance</td>
88             <td>
89               {{aPlace.calculated_importance}}
90               {{#unless aPlace.importance}} (estimated){{/unless}}
91             </td>
92           </tr>
93         {{/if}}
94         <tr>
95           <td>Coverage</td>
96           <td>{{coverageType aPlace}}</td>
97         </tr>
98         <tr>
99           <td>Centre Point (lat,lon)</td>
100           <td>
101             {{aPlace.centroid.coordinates.[1]}},{{aPlace.centroid.coordinates.[0]}}
102           </td>
103         </tr>
104         <tr>
105           <td>OSM</td>
106           <td>{{osmLink aPlace}}
107         </tr>
108         <tr>
109           <td>
110             Place Id
111             (<a href="https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id">on this server</a>)
112           </td>
113           <td>{{aPlace.place_id}}</td>
114         </tr>
115         {{#if aPlace.calculated_wikipedia}}
116           <tr>
117             <td>Wikipedia Calculated</td>
118             <td>{{wikipediaLink aPlace}}</td>
119           </tr>
120         {{/if}}
121         <tr>
122           <td>Computed Postcode</td>
123           <td>{{aPlace.calculated_postcode}}</td>
124         </tr>
125         <tr>
126           <td>Address Tags</td>
127           <td>
128             {{#each aPlace.addresstags}}
129               <div class="line">
130                 <span class="name">{{this}}</span> ({{@key}})
131               </div>
132             {{/each}}
133           </td>
134         </tr>
135         <tr>
136           <td>Extra Tags</td>
137           <td>
138             {{#each aPlace.extratags}}
139               <div class="line">
140                 <span class="name">{{this}}</span> ({{@key}})
141               </div>
142             {{/each}}
143           </td>
144         </tr>
145       </table>
146     </div>
147     <div class="col-md-6">
148       <div id="map"></div>
149     </div>
150   </div>
151   <div class="row">
152     <div class="col-md-12">
153       <h2>Address</h2>
154        <table id="address" class="table table-striped table-small">
155         <thead>
156           <tr>
157             <th>Local name</th>
158             <th>Type</th>
159             <th>OSM</th>
160             <th>Address rank</th>
161             <th>Admin level</th>
162             <th>Distance</th>
163             <th></th>
164           </tr>
165         </thead>
166         <tbody>
167           {{#if aPlace.address}}
168             {{#each aPlace.address}}
169               {{> partial_details_one_row bDistanceInMeters=false bAddressLineUsed=this.isaddress}}
170             {{/each}}
171           {{/if}}
172
173           {{#if aPlace.linked_places}}
174             {{> partial_h2 'Linked Places'}}
175             {{#each aPlace.linked_places}}
176               {{> partial_details_one_row bDistanceInMeters=true bAddressLineUsed=true}}
177             {{/each}}
178           {{/if}}
179
180           {{> partial_h2 'Keywords'}}
181           {{#if aPlace.keywords}}
182             {{> partial_h3 'Name Keywords'}}
183             {{#each aPlace.keywords.name}}
184               {{> partial_details_keyword_one_row}}
185             {{/each}}
186
187             {{> partial_h3 'Address Keywords'}}
188             {{#each aPlace.keywords.address}}
189               {{> partial_details_keyword_one_row}}
190             {{/each}}
191           {{else}}
192             <tr>
193               <td>
194                 <a class="btn btn-outline-secondary btn-sm"
195                   href="{{base_url}}&keywords=1">display keywords</a>
196               </td>
197             </tr>
198           {{/if}}
199
200           {{> partial_h2 'Parent Of'}}
201           {{#if aPlace.hierarchy}}
202
203             {{#each aPlace.hierarchy as |lines type|}}
204               {{> partial_h3 type}}
205               {{#each lines}}
206                 {{> partial_details_one_row bDistanceInMeters=true bAddressLineUsed=true}}
207               {{/each}}
208             {{/each}}
209           {{else}}
210             <tr>
211               <td>
212                 <a class="btn btn-outline-secondary btn-sm"
213                   href="{{base_url}}&hierarchy=1">display child places</a>
214               </td>
215             </tr>
216           {{/if}}
217           {{tooManyHierarchyLinesWarning aPlace}}
218         </tbody>
219       </table>
220     </div>
221   </div>
222 </div>
223