1 | #**
|
---|
2 | * Renders the main query form
|
---|
3 | *#
|
---|
4 |
|
---|
5 | <div class="query-box">
|
---|
6 | <form id="query-form" action="#{url_for_home}" method="GET">
|
---|
7 |
|
---|
8 | <div class="inputs">
|
---|
9 | <span #annTitle("Add the query using the &q= parameter")>
|
---|
10 | Find:
|
---|
11 | <input type="text" id="q" name="q" value="$!esc.html($params.get('q'))"/>
|
---|
12 | <input type="submit" id="querySubmit"/>
|
---|
13 | <input type="reset"/>
|
---|
14 | </span>
|
---|
15 | <div class="query-boost">
|
---|
16 | <span #annTitle("Add the boost function &bf=price to the query")>
|
---|
17 | <input type="checkbox" name="bf" value="price"
|
---|
18 | #if($request.params.get('bf') == 'price')checked="true"#end
|
---|
19 | >
|
---|
20 | Boost by Price
|
---|
21 | </input>
|
---|
22 | </span>
|
---|
23 | #parse("query_spatial.vm")
|
---|
24 | #parse("query_group.vm")
|
---|
25 | </div>
|
---|
26 | </div>
|
---|
27 |
|
---|
28 | #if($request.params.get('debugQuery'))
|
---|
29 | <input type="hidden" name="debugQuery" value="true"/>
|
---|
30 | #end
|
---|
31 | #if($annotate == true)
|
---|
32 | <input type="hidden" name="annotateBrowse" value="true"/>
|
---|
33 | #end
|
---|
34 | #foreach($fq in $request.params.getParams('fq'))
|
---|
35 | #if ($fq != "{!bbox}")
|
---|
36 | <input type="hidden" name="fq" id="allFQs" value="$esc.html($fq)"/>
|
---|
37 | #end
|
---|
38 | #end
|
---|
39 |
|
---|
40 | <div class="constraints" #annTitle("Lists out the &fq filters. Click to remove.")>
|
---|
41 | #foreach($fq in $params.getParams('fq'))
|
---|
42 | #set($previous_fq_count=$velocityCount - 1)
|
---|
43 | #if($fq != '')
|
---|
44 | >
|
---|
45 | <a style="{text-decoration: line-through;}"
|
---|
46 | href="#url_for_filters($request.params.getParams('fq').subList(0,$previous_fq_count))"
|
---|
47 | >$fq</a>
|
---|
48 | #end
|
---|
49 | #end
|
---|
50 | </div>
|
---|
51 |
|
---|
52 | <div class="parsed_query_header">
|
---|
53 | #if($request.params.get('debugQuery'))
|
---|
54 | <a href="#" onclick='jQuery(this).siblings("div").toggle(); return false;'>toggle parsed query</a>
|
---|
55 | <div class="parsed_query" style="display:none">$response.response.debug.parsedquery</div>
|
---|
56 | #end
|
---|
57 | #set($queryOpts = $request.params.get("queryOpts"))
|
---|
58 | #if($queryOpts && $queryOpts != "")
|
---|
59 | <input type="hidden" name="queryOpts" value="$queryOpts"/>
|
---|
60 | #end
|
---|
61 | </div>
|
---|
62 |
|
---|
63 | </form>
|
---|
64 | </div>
|
---|