diff options
| author | Markus Heiser <markus.heiser@darmarit.de> | 2021-05-26 19:43:27 +0200 |
|---|---|---|
| committer | Markus Heiser <markus.heiser@darmarit.de> | 2021-05-28 08:32:52 +0200 |
| commit | 6ed4616da99b25703489e7431d84d8749a7a167c (patch) | |
| tree | b05c82a900f25c384f3cf26898314225ba5d1fc3 /searx/templates/simple/results.html | |
| parent | e1f244b2d5698480f93169fce4bdc1782fc75bda (diff) | |
[enh] add settings option to enable/disable search formats
Access to formats can be denied by settings configuration::
search:
formats: [html, csv, json, rss]
Closes: https://github.com/searxng/searxng/issues/95
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/templates/simple/results.html')
| -rw-r--r-- | searx/templates/simple/results.html | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/searx/templates/simple/results.html b/searx/templates/simple/results.html index c53529edd..a68449736 100644 --- a/searx/templates/simple/results.html +++ b/searx/templates/simple/results.html @@ -85,8 +85,9 @@ <div class="selectable_url"><pre>{{ url_for('search', _external=True) }}?q={{ q|urlencode }}&language={{ current_language }}&time_range={{ time_range }}&safesearch={{ safesearch }}{% if pageno > 1 %}&pageno={{ pageno }}{% endif %}{% if selected_categories %}&categories={{ selected_categories|join(",") | replace(' ','+') }}{% endif %}{% if timeout_limit %}&timeout_limit={{ timeout_limit|urlencode }}{% endif %}</pre></div> </div> <div id="apis"> + {% if search_formats %} <h4 class="title">{{ _('Download results') }}</h4> - {% for output_type in ('csv', 'json', 'rss') %} + {% for output_type in search_formats %} <div class="left"> <form method="{{ method or 'POST' }}" action="{{ url_for('search') }}"> <input type="hidden" name="q" value="{{ q|e }}"> @@ -103,6 +104,7 @@ </form> </div> {% endfor %} + {% endif %} </div> </div> |