]> git.openstreetmap.org Git - nominatim-ui.git/blob - src/templates/searchpage.hbs
details page: addressline.isaddress is a boolean, not t/f string
[nominatim-ui.git] / src / templates / searchpage.hbs
1 {{#*inline "partial_one_result"}}
2   <div class="result" data-position="{{iResNum}}">
3     {{#if aResult.icon}}
4       {{!-- <img src="{{env.Images_Base_Url}}{{aResult.icon}}" /> --}}
5       {{formatMapIcon aResult.icon}}
6     {{/if}}
7
8     <span class="name">{{aResult.display_name}}</span>
9     <span class="type">({{formatLabel aResult}})</span>
10     <p class="coords">{{aResult.lat}},{{aResult.lon}}</p>  
11
12     <a class="btn btn-default btn-xs details"
13        href="details.html?osmtype={{shortOSMType aResult.osm_type}}&osmid={{aResult.osm_id}}">details</a>
14   </div>
15 {{/inline}}
16
17
18 <form class="form-inline" role="search" accept-charset="UTF-8" action="">
19   <div class="form-group">
20     <input id="q"
21            name="q"
22            type="text"
23            class="form-control input-sm"
24            placeholder="Search"
25            value="{{sQuery}}" />
26   </div>
27   <div class="form-group search-button-group">
28     <button type="submit" class="btn btn-primary btn-sm">Search</button>
29     {{#if env.Search_AreaPolygons}}
30       <input type="hidden" value="1" name="polygon_geojson" />
31     {{/if}}
32     <input type="hidden" name="viewbox" value="{{sViewBox}}" />
33     <div class="checkbox-inline">
34       <input type="checkbox"
35              id="use_viewbox" {{#if sViewBox}}checked="checked"{{/if}}>
36       <label for="use_viewbox">apply viewbox</label>
37     </div>
38   </div>
39   <div class="search-type-link">
40     <a id="switch-to-reverse" href="/reverse.html">reverse search</a>
41   </div>
42 </form>
43
44 <div id="content">
45
46   {{#if sQuery}}
47     <div id="searchresults" class="sidebar">
48       {{#each aSearchResults as |aResult|}}
49         {{>partial_one_result iResNum=@index aResult=aResult env=env}}
50       {{/each}}
51
52       {{#if aSearchResults}}
53         {{#if sMoreURL}}
54           <div class="more">
55             <a class="btn btn-primary" href="{{sMoreURL}}">
56               Search for more results
57             </a>
58           </div>
59         {{/if}}
60       {{else}}
61         <div class="noresults">No search results found</div>
62       {{/if}}
63     </div>
64
65   {{else}}
66
67     <div id="intro" class="sidebar">
68       <h2>Welcome to Nominatim</h2>
69
70       <p>
71         Nominatim is a search engine for
72         <a href="https://www.openstreetmap.org">OpenStreetMap</a> data. This
73         is the debugging interface. You may search for a name or address
74         (forward search) or look up data by its geographic coordinate (reverse
75         search). Each result comes with a link to a details page where you
76         can inspect what data about the object is saved in the database and
77         investigate how the address of the object has been computed.
78       </p>
79
80       For more information visit the
81       <a href="https://nominatim.org">Nominatim home page</a>.
82     </div>
83
84   {{/if}}
85
86   <div id="map-wrapper">
87     <div id="map-position">
88       <div id="map-position-inner"></div>
89       <div id="map-position-close"><a href="#">hide</a></div>
90     </div>
91     <div id="map"></div>
92   </div>
93 </div>