From 8026ed0d3799e999fdae8e361d7f1478d4d8d52f Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Wed, 28 Apr 2021 17:54:43 +0200 Subject: [PATCH] [mod] UI: engine pref-page, about toolbox: add link to stats In the preference page, in the 'about' toolbox of an engine, add a link to the stats page of the engine, if the engine had one or more errors. Condition is:: reliabilities[].errors Signed-off-by: Markus Heiser --- searx/templates/oscar/preferences.html | 17 +++++++++++------ searx/templates/simple/preferences.html | 6 ++++++ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html index 6bf66617b..3f113afec 100644 --- a/searx/templates/oscar/preferences.html +++ b/searx/templates/oscar/preferences.html @@ -12,6 +12,11 @@ {%- if stats[search_engine.name]['result_count'] -%}

{{ _('Number of results') }}: {{ stats[search_engine.name]['result_count'] }} ( {{ _('Avg.') }} )

{{- "" -}} {%- endif -%} + {%- if reliabilities[search_engine.name].errors -%} + + {{ _('View error logs and submit a bug report') }} + + {%- endif -%} {%- endif -%} {%- endmacro %} @@ -420,22 +425,22 @@ -

- {{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }} +

+ {{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }} {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}

- {{ _('Search URL of the currently saved preferences') }} - ({{ _('Note: specifying custom settings in the search URL can reduce privacy by leaking data to the clicked result sites.') }}): + {{ _('Search URL of the currently saved preferences') }} + ({{ _('Note: specifying custom settings in the search URL can reduce privacy by leaking data to the clicked result sites.') }}):

- {% endblock %} diff --git a/searx/templates/simple/preferences.html b/searx/templates/simple/preferences.html index 76d56675b..3e0f6d4cd 100644 --- a/searx/templates/simple/preferences.html +++ b/searx/templates/simple/preferences.html @@ -25,6 +25,12 @@

{{about.website}}

{%- if about.wikidata_id -%}

wikidata.org/wiki/{{about.wikidata_id}}

{%- endif -%} {%- if search_engine.enable_http %}

{{ icon('exclamation-sign', 'No HTTPS') }}{{ _('No HTTPS')}}

{% endif -%} + {%- if reliabilities[search_engine.name].errors -%} + + {{ _('View error logs and submit a bug report') }} + + {%- endif -%} + {%- endif -%} {%- endmacro %}