on master help sign in
[enh] csv/json download buttons
commitd1dd6364c9ee5b1ae78596ad4dcd7e38837927a8 authorasciimoo <asciimoo@gmail.com> dateMon 25 Nov 2013, 09:04 (13 years ago) parent3b72cfa
2 files changed+15−1
searx/templates/results.html+14 searx/templates/search.html+1−1
searx/templates/results.html+14
@@ -18,5 +18,19 @@
1818 {% include 'result_templates/default.html' %}
1919 {% endif %}
2020 {% endfor %}
21+ <form method="post" action="">
22+ <div class="left">
23+ <input type="hidden" name="q" value="{{ q }}" />
24+ <input type="hidden" name="format" value="csv" />
25+ <input type="submit" value="download results in csv" />
26+ </div>
27+ </form>
28+ <form method="post" action="">
29+ <div class="">
30+ <input type="hidden" name="q" value="{{ q }}" />
31+ <input type="hidden" name="format" value="json" />
32+ <input type="submit" value="download results in json" />
33+ </div>
34+ </form>
2135</div>
2236{% endblock %}
searx/templates/search.html+1−1
@@ -1,4 +1,4 @@
1−<form method="post" action="/" id="search_form">
1+<form method="post" action="" id="search_form">
22<div id="search_wrapper">
33 <input type="text" class="q" name="q" tabindex="1" autocomplete="off" {% if q %}value="{{ q }}"{% endif %}/>
44 <input type="submit" value="" id="search_submit" />