mirror of
https://github.com/searxng/searxng.git
synced 2024-11-23 11:21:00 +00:00
[fix] add search language and time range filter to suggestions - fixes #1314
This commit is contained in:
parent
9b9b5e9625
commit
6278538890
1 changed files with 12 additions and 0 deletions
|
@ -43,6 +43,12 @@
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
{% for suggestion in suggestions %}
|
{% 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">
|
<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 }}">
|
<input type="hidden" name="q" value="{{ suggestion.url }}">
|
||||||
<button type="submit" class="btn btn-default btn-xs">{{ suggestion.title }}</button>
|
<button type="submit" class="btn btn-default btn-xs">{{ suggestion.title }}</button>
|
||||||
</form>
|
</form>
|
||||||
|
@ -87,6 +93,12 @@
|
||||||
<span class="result_header text-muted form-inline pull-left suggestion_item">{{ _('Try searching for:') }}</span>
|
<span class="result_header text-muted form-inline pull-left suggestion_item">{{ _('Try searching for:') }}</span>
|
||||||
{% for correction in corrections -%}
|
{% for correction in corrections -%}
|
||||||
<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" role="navigation" class="form-inline pull-left suggestion_item">{{- "" -}}
|
<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 }}">{{- "" -}}
|
<input type="hidden" name="q" value="{{ correction.url }}">{{- "" -}}
|
||||||
<button type="submit" class="btn btn-default btn-xs">{{ correction.title }}</button>{{- "" -}}
|
<button type="submit" class="btn btn-default btn-xs">{{ correction.title }}</button>{{- "" -}}
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in a new issue