]> git.openstreetmap.org Git - nominatim-ui.git/blob - src/templates/detailspage.hbs
first commit
[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}}</td>
17     </tr>
18 {{/inline}}
19
20 {{#*inline "partial_details_keyword_one_row"}}
21     <tr>
22         <td>{{formatKeywordToken this.word_token}}</td>
23         {{#if this.word_id}}
24             <td>word id: {{this.word_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}}</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.aNames}}
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.class}}:{{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>{{aPlace.rank_search_label}}</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</td>
89                     <td>{{aPlace.lat}},{{aPlace.lon}}</td>
90                 </tr>
91                 <tr>
92                     <td>OSM</td>
93                     <td>{{osmLink aPlace}}
94                 </tr>
95                 {{#if aPlace.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.postcode}}</td>
104                 </tr>
105                 <tr>
106                     <td>Address Tags</td>
107                     <td>
108                         {{#each aPlace.aAddressTags}}
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.aExtraTags}}
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                     {{#each aPlace.address_lines}}
144                         {{> partial_details_one_row}}
145                     {{/each}}
146
147
148                     {{#if aPlace.linked_lines}}
149                         {{> partial_h2 'Linked Places'}}
150                         {{#each aPlace.linked_lines}}
151                             {{> partial_details_one_row}}
152                         {{/each}}
153                     {{/if}}
154
155                     {{#if aPlace.place_search_name_keywords}}
156                         {{> partial_h2 'Name Keywords'}}
157                         {{#each aPlace.place_search_name_keywords}}
158                             {{> partial_details_keyword_one_row}}
159                         {{/each}}
160                     {{/if}}
161
162                     {{#if aPlace.place_search_address_keywords}}
163                         {{> partial_h2 'Address Keywords'}}
164                         {{#each aPlace.place_search_address_keywords}}
165                             {{> partial_details_keyword_one_row}}
166                         {{/each}}
167                     {{/if}}
168
169                     {{#if aPlace.parentof_lines}}
170                         {{> partial_h2 'Parent Of'}}
171
172                         {{#each aPlace.parentof_lines as |lines type|}}
173                             {{> partial_h3 type}}
174                             {{#each lines}}
175                                 {{> partial_details_one_row}}
176                             {{/each}}
177                         {{/each}}
178                         
179         {{!--                 @if (sizeof($aParentOfLines) >= 500)
180                             <p>There are more child objects which are not shown.</p>
181                         @end --}}
182                    {{/if}}
183                 </tbody>
184             </table>
185         </div>
186     </div>
187 </div>
188