]> git.openstreetmap.org Git - nominatim-ui.git/blob - src/templates/detailspage.hbs
default to localhost
[nominatim-ui.git] / src / templates / detailspage.hbs
1
2 {{#*inline "partial_details_one_row"}}
3   <tr class="{{isaddresses_unused this}}">
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>{{this.class}}:{{this.type}}</td>
12     <td>{{osmLink this}}</td>
13     <td>{{this.rank_address}}</td>
14     <td>{{formatAdminLevel this.admin_level}}</td>
15     <td>{{formatDistance this.distance}}</td>
16     <td>{{detailsLink this null}}</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>{{aPlace.localname}} <small>{{detailsPermaLink aPlace 'link to this page'}}</small></h1>
42     </div>
43     <div class="col-sm-2 text-right">
44       {{formatMapIcon aPlace.icon}}
45     </div>
46   </div>
47   <div class="row">
48     <div class="col-md-6">
49       <table id="locationdetails" class="table table-striped">
50         <tr>
51           <td>Name</td>
52           <td>
53             {{#each aPlace.names}}
54               <div class="line"><span class="name">{{this}}</span> ({{@key}})</div>
55             {{/each}}
56           </td>
57         </tr>
58         <tr>
59           <td>Type</td>
60           <td>{{aPlace.category}}:{{aPlace.type}}</td>
61         </tr>
62         <tr>
63           <td>Last Updated</td>
64           <td>{{aPlace.indexed_date}}</td>
65         </tr>
66         <tr>
67           <td>Admin Level</td>
68           <td>{{aPlace.admin_level}}</td>
69         </tr>
70         <tr>
71           <td>Rank</td>
72           <td>{{formatSearchRank aPlace.rank_search}}</td>
73         </tr>
74         {{#if aPlace.calculated_importance}}
75           <tr>
76             <td>Importance</td>
77             <td>
78               {{aPlace.calculated_importance}}
79               {{#unless aPlace.importance}} (estimated){{/unless}}
80             </td>
81           </tr>
82         {{/if}}
83         <tr>
84           <td>Coverage</td>
85           <td>{{coverageType aPlace}}</td>
86         </tr>
87         <tr>
88           <td>Centre Point (lat,lon)</td>
89           <td>{{aPlace.centroid.coordinates.[1]}},{{aPlace.centroid.coordinates.[0]}}</td>
90         </tr>
91         <tr>
92           <td>OSM</td>
93           <td>{{osmLink aPlace}}
94         </tr>
95         {{#if aPlace.calculated_wikipedia}}
96           <tr>
97             <td>Wikipedia Calculated</td>
98             <td>{{wikipediaLink aPlace}}</td>
99           </tr>
100         {{/if}}
101         <tr>
102           <td>Computed Postcode</td>
103           <td>{{aPlace.calculated_postcode}}</td>
104         </tr>
105         <tr>
106           <td>Address Tags</td>
107           <td>
108             {{#each aPlace.addresstags}}
109               <div class="line"><span class="name">{{this}}</span> ({{@key}})</div>
110             {{/each}}
111           </td>
112         </tr>
113         <tr>
114           <td>Extra Tags</td>
115           <td>
116             {{#each aPlace.extratags}}
117               <div class="line"><span class="name">{{this}}</span> ({{@key}})</div>
118             {{/each}}
119           </td>
120         </tr>
121       </table>
122     </div>
123     <div class="col-md-6">
124       <div id="map"></div>
125     </div>
126   </div>
127   <div class="row">
128     <div class="col-md-12">
129       <h2>Address</h2>
130        <table id="address" class="table table-striped table-responsive">
131         <thead>
132           <tr>
133             <th>Local name</th>
134             <th>Type</th>
135             <th>OSM</th>
136             <th>Address rank</th>
137             <th>Admin level</th>
138             <th>Distance</th>
139             <th></th>
140           </tr>
141         </thead>
142         <tbody>
143           {{#if aPlace.address}}
144             {{#each aPlace.address}}
145               {{> partial_details_one_row}}
146             {{/each}}
147           {{/if}}
148
149           {{#if aPlace.linked_places}}
150             {{> partial_h2 'Linked Places'}}
151             {{#each aPlace.linked_places}}
152               {{> partial_details_one_row}}
153             {{/each}}
154           {{/if}}
155
156           {{#if aPlace.keywords}}
157             {{> partial_h2 'Name Keywords'}}
158             {{#each aPlace.keywords.name}}
159               {{> partial_details_keyword_one_row}}
160             {{/each}}
161
162             {{> partial_h2 'Address Keywords'}}
163             {{#each aPlace.keywords.address}}
164               {{> partial_details_keyword_one_row}}
165             {{/each}}
166           {{/if}}
167
168           {{#if aPlace.hierarchy}}
169             {{> partial_h2 'Parent Of'}}
170
171             {{#each aPlace.hierarchy as |lines type|}}
172               {{> partial_h3 type}}
173               {{#each lines}}
174                 {{> partial_details_one_row}}
175               {{/each}}
176             {{/each}}
177           {{/if}}
178           {{tooManyHierarchyLinesWarning aPlace}}
179         </tbody>
180       </table>
181     </div>
182   </div>
183 </div>
184