]> git.openstreetmap.org Git - nominatim-ui.git/blob - dist/detailspage.hbs
max line length for javascript = 100
[nominatim-ui.git] / dist / 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>{{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>{{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         <tr>
96           <td>Place Id (<a href="https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id">on this server</a>)</td>
97           <td>{{aPlace.place_id}}</td>
98         </tr>
99         {{#if aPlace.calculated_wikipedia}}
100           <tr>
101             <td>Wikipedia Calculated</td>
102             <td>{{wikipediaLink aPlace}}</td>
103           </tr>
104         {{/if}}
105         <tr>
106           <td>Computed Postcode</td>
107           <td>{{aPlace.calculated_postcode}}</td>
108         </tr>
109         <tr>
110           <td>Address Tags</td>
111           <td>
112             {{#each aPlace.addresstags}}
113               <div class="line"><span class="name">{{this}}</span> ({{@key}})</div>
114             {{/each}}
115           </td>
116         </tr>
117         <tr>
118           <td>Extra Tags</td>
119           <td>
120             {{#each aPlace.extratags}}
121               <div class="line"><span class="name">{{this}}</span> ({{@key}})</div>
122             {{/each}}
123           </td>
124         </tr>
125       </table>
126     </div>
127     <div class="col-md-6">
128       <div id="map"></div>
129     </div>
130   </div>
131   <div class="row">
132     <div class="col-md-12">
133       <h2>Address</h2>
134        <table id="address" class="table table-striped table-responsive">
135         <thead>
136           <tr>
137             <th>Local name</th>
138             <th>Type</th>
139             <th>OSM</th>
140             <th>Address rank</th>
141             <th>Admin level</th>
142             <th>Distance</th>
143             <th></th>
144           </tr>
145         </thead>
146         <tbody>
147           {{#if aPlace.address}}
148             {{#each aPlace.address}}
149               {{> partial_details_one_row}}
150             {{/each}}
151           {{/if}}
152
153           {{#if aPlace.linked_places}}
154             {{> partial_h2 'Linked Places'}}
155             {{#each aPlace.linked_places}}
156               {{> partial_details_one_row}}
157             {{/each}}
158           {{/if}}
159
160           {{#if aPlace.keywords}}
161             {{> partial_h2 'Name Keywords'}}
162             {{#each aPlace.keywords.name}}
163               {{> partial_details_keyword_one_row}}
164             {{/each}}
165
166             {{> partial_h2 'Address Keywords'}}
167             {{#each aPlace.keywords.address}}
168               {{> partial_details_keyword_one_row}}
169             {{/each}}
170           {{/if}}
171
172           {{> partial_h2 'Parent Of'}}
173           {{#if aPlace.hierarchy}}
174
175             {{#each aPlace.hierarchy as |lines type|}}
176               {{> partial_h3 type}}
177               {{#each lines}}
178                 {{> partial_details_one_row}}
179               {{/each}}
180             {{/each}}
181           {{else}}
182             <tr>
183               <td>
184                 <a class="btn btn-default btn-xs" href="{{base_url}}&hierarchy=1">display child places</a>
185               </td>
186             </tr>
187           {{/if}}
188           {{tooManyHierarchyLinesWarning aPlace}}
189         </tbody>
190       </table>
191     </div>
192   </div>
193 </div>
194