summaryrefslogtreecommitdiff
path: root/searx/templates/oscar/results.html
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2021-03-02 14:24:55 +0100
committerAdam Tauber <asciimoo@gmail.com>2021-03-06 12:12:35 +0100
commit44f4a9d49a0d78668b37fca8558ae63c5fdef271 (patch)
tree5eb04f4a6efc0537fc21d019990428b4a9b5c4b6 /searx/templates/oscar/results.html
parent87f4cc4a9e51f1215f1450ea056ac40e7a961978 (diff)
downloadsearxng-44f4a9d49a0d78668b37fca8558ae63c5fdef271.tar.gz
searxng-44f4a9d49a0d78668b37fca8558ae63c5fdef271.zip
[enh] add ability to send engine data to subsequent requests
Diffstat (limited to 'searx/templates/oscar/results.html')
-rw-r--r--searx/templates/oscar/results.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html
index eada8cd26..df2d42430 100644
--- a/searx/templates/oscar/results.html
+++ b/searx/templates/oscar/results.html
@@ -7,6 +7,13 @@
<input type="hidden" name="language" value="{{ current_language }}" />{{- "" -}}
{% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}" />{% endif -%}
{%- endmacro %}
+{% macro engine_data_form(engine_data) -%}
+ {% for engine_name, kv_data in engine_data.items() %}
+ {% for k, v in kv_data.items() %}
+ <input type="hidden" name="engine_data-{{ engine_name }}-{{ k|e }}" value="{{ v|e }}" />
+ {% endfor %}
+ {% endfor %}
+{%- endmacro %}
{%- macro search_url() %}{{ url_for('search', _external=True) }}?q={{ q|urlencode }}{% if selected_categories %}&amp;categories={{ selected_categories|join(",") | replace(' ','+') }}{% endif %}{% if pageno > 1 %}&amp;pageno={{ pageno }}{% endif %}{% if time_range %}&amp;time_range={{ time_range }}{% endif %}{% if current_language != 'all' %}&amp;language={{ current_language }}{% endif %}{% endmacro -%}
{% block title %}{{ q|e }} - {% endblock %}
@@ -142,12 +149,14 @@
<div class="pull-left">{{- "" -}}
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="pull-left">
{{- search_form_attrs(pageno+1) -}}
+ {{- engine_data_form(engine_data) -}}
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-backward"></span> {{ _('next page') }}</button>{{- "" -}}
</form>{{- "" -}}
</div>
<div class="pull-right">{{- "" -}}
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="pull-left">
{{- search_form_attrs(pageno-1) -}}
+ {{- engine_data_form(engine_data) -}}
<button type="submit" class="btn btn-default" {% if pageno == 1 %}disabled{% endif %}><span class="glyphicon glyphicon-forward"></span> {{ _('previous page') }}</button>{{- "" -}}
</form>{{- "" -}}
</div>
@@ -158,12 +167,14 @@
<div class="pull-left">{{- "" -}}
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="pull-left">
{{- search_form_attrs(pageno-1) -}}
+ {{- engine_data_form(engine_data) -}}
<button type="submit" class="btn btn-default" {% if pageno == 1 %}disabled{% endif %}><span class="glyphicon glyphicon-backward"></span> {{ _('previous page') }}</button>{{- "" -}}
</form>{{- "" -}}
</div>
<div class="pull-right">{{- "" -}}
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="pull-left">
{{- search_form_attrs(pageno+1) -}}
+ {{- engine_data_form(engine_data) -}}
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-forward"></span> {{ _('next page') }}</button>{{- "" -}}
</form>{{- "" -}}
</div>