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