summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2020-08-27 14:26:38 +0200
committerAdam Tauber <asciimoo@gmail.com>2020-08-27 14:26:38 +0200
commit627853889039bce5a95d88e281311e4186ee3bba (patch)
treee2bb06ce7fb7c7afffd03be8d36e03ba15f9a95f /searx
parent9b9b5e962520b2122cccb32858cce6fc8e0a0130 (diff)
downloadsearxng-627853889039bce5a95d88e281311e4186ee3bba.tar.gz
searxng-627853889039bce5a95d88e281311e4186ee3bba.zip
[fix] add search language and time range filter to suggestions - fixes #1314
Diffstat (limited to 'searx')
-rw-r--r--searx/templates/oscar/results.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html
index 313f5843b..a7f96d8d2 100644
--- a/searx/templates/oscar/results.html
+++ b/searx/templates/oscar/results.html
@@ -43,6 +43,12 @@
<div class="panel-body">
{% for suggestion in suggestions %}
<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" role="navigation" class="form-inline pull-{% if rtl %}right{% else %}left{% endif %} suggestion_item">
+ {% if current_language != 'all' %}
+ <input type="hidden" name="language" value="{{ current_language }}">
+ {% endif %}
+ {% if time_range %}
+ <input type="hidden" name="time_range" value="{{ time_range }}">
+ {% endif %}
<input type="hidden" name="q" value="{{ suggestion.url }}">
<button type="submit" class="btn btn-default btn-xs">{{ suggestion.title }}</button>
</form>
@@ -87,6 +93,12 @@
<span class="result_header text-muted form-inline pull-left suggestion_item">{{ _('Try searching for:') }}</span>
{% for correction in corrections -%}
<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" role="navigation" class="form-inline pull-left suggestion_item">{{- "" -}}
+ {% if current_language != 'all' %}
+ <input type="hidden" name="language" value="{{ current_language }}">
+ {% endif %}
+ {% if time_range %}
+ <input type="hidden" name="time_range" value="{{ time_range }}">
+ {% endif %}
<input type="hidden" name="q" value="{{ correction.url }}">{{- "" -}}
<button type="submit" class="btn btn-default btn-xs">{{ correction.title }}</button>{{- "" -}}
</form>