]> git.openstreetmap.org Git - nominatim-ui.git/blob - dist/searchpage.hbs
split configuration into hardcoded default and optional config.js
[nominatim-ui.git] / dist / searchpage.hbs
1 {{#*inline "partial_one_result"}}
2   <div class="result" data-position="{{iResNum}}">
3     {{formatMapIcon aResult}}
4
5     <span class="name">{{aResult.display_name}}</span>
6     <span class="type">({{formatLabel aResult}})</span>
7     <p class="coords">{{aResult.lat}},{{aResult.lon}}</p>  
8
9     <a class="details btn btn-outline-secondary btn-sm"
10        href="details.html?osmtype={{shortOSMType aResult.osm_type}}&osmid={{aResult.osm_id}}">details</a>
11   </div>
12 {{/inline}}
13
14 <div class="top-bar" id="structured-query-selector">
15   <div class="search-type-link">
16     <a id="switch-to-reverse" href="/reverse.html">reverse search</a>
17   </div>
18   <div class="form-check form-check-inline">
19     <input class="form-check-input" type="radio" name="query-selector"
20            id="simple" value="simple" {{#unless hStructured}}checked="checked"{{/unless}}>
21     <label class="form-check-label" for="simple">simple</label>
22   </div>
23   <div class="form-check form-check-inline">
24     <input class="form-check-input" type="radio" name="query-selector"
25             id="structured" value="structured" {{#if hStructured}}checked="checked"{{/if}}>
26     <label class="form-check-label" for="structured">structured</label>
27   </div>
28
29   <form class="form-inline" role="search" accept-charset="UTF-8" action="">
30     <div class="form-group-simple {{#if hStructured}}hidden{{/if}}">
31       <input id="q"
32              name="q"
33              type="text"
34              class="form-control form-control-sm"
35              placeholder="Search"
36              value="{{sQuery}}" />
37     </div>
38     <div class="form-group-structured {{#unless hStructured}}hidden{{/unless}}">
39       <div class="form-inline">
40         <input name="street" type="text" class="form-control form-control-sm mr-1"
41                placeholder="House number/Street"
42                value="{{hStructured.street}}" />
43         <input name="city" type="text" class="form-control form-control-sm mr-1"
44                placeholder="City"
45                value="{{hStructured.city}}" />
46         <input id="county" name="county" type="text" class="form-control form-control-sm mr-1"
47                placeholder="County"
48                value="{{hStructured.county}}" />
49         <input name="state" type="text" class="form-control form-control-sm mr-1"
50                placeholder="State"
51                value="{{hStructured.state}}" />
52         <input name="country" type="text" class="form-control form-control-sm mr-1"
53                placeholder="Country"
54                value="{{hStructured.country}}" />
55         <input name="postalcode" type="text" class="form-control form-control-sm mr-1"
56                placeholder="Postal Code"
57                value="{{hStructured.postalcode}}" />
58       </div>
59     </div>
60     <div class="form-group search-button-group">
61             <button type="submit" class="btn btn-primary btn-sm mx-1">Search</button>
62       {{#if env.Search_AreaPolygons}}
63         <input type="hidden" value="1" name="polygon_geojson" />
64       {{/if}}
65       <input type="hidden" name="viewbox" value="{{sViewBox}}" />
66       <div class="form-check form-check-inline">
67         <input type="checkbox" class="form-check-input"
68                id="use_viewbox" {{#if sViewBox}}checked="checked"{{/if}}>
69         <label class="form-check-label" for="use_viewbox">apply viewbox</label>
70       </div>
71     </div>
72   </form>
73 </div>
74
75 <div id="content">
76
77   {{#if sQuery}}
78     <div id="searchresults" class="sidebar">
79       {{#each aSearchResults as |aResult|}}
80         {{>partial_one_result iResNum=@index aResult=aResult env=env}}
81       {{/each}}
82
83       {{#if aSearchResults}}
84         {{#if sMoreURL}}
85           <div class="more">
86             <a class="btn btn-primary" href="{{sMoreURL}}">
87               Search for more results
88             </a>
89           </div>
90         {{/if}}
91       {{else}}
92         <div class="noresults">No search results found</div>
93       {{/if}}
94     </div>
95
96   {{else}}
97
98     <div id="intro" class="sidebar">
99       <h2>Welcome to Nominatim</h2>
100
101       <p>
102         Nominatim is a search engine for
103         <a href="https://www.openstreetmap.org">OpenStreetMap</a> data. This
104         is the debugging interface. You may search for a name or address
105         (forward search) or look up data by its geographic coordinate (reverse
106         search). Each result comes with a link to a details page where you
107         can inspect what data about the object is saved in the database and
108         investigate how the address of the object has been computed.
109       </p>
110
111       For more information visit the
112       <a href="https://nominatim.org">Nominatim home page</a>.
113     </div>
114
115   {{/if}}
116
117   <div id="map-wrapper">
118     <div id="map-position">
119       <div id="map-position-inner"></div>
120       <div id="map-position-close"><a href="#">hide</a></div>
121     </div>
122     <div id="map"></div>
123   </div>
124 </div>