From e83862c22f17295b8d493240cd0c51d25d1c59f9 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Fri, 30 Apr 2021 11:49:39 +0200 Subject: [PATCH] [themes] /preferences, reliablity: warning icons & error logs link When there is at least one errors or one failed checker test: * the warning icon is displayed in the reliability column * the link "View error logs and submit a bug report" is displayed on engine name tooltip. Before: * the warning icon was displayed only when one or more checker test(s) failed. * the link "View error logs and submit a bug report" was not shown when a checker test failed but there were no error. --- searx/templates/oscar/preferences.html | 8 ++++---- searx/templates/simple/preferences.html | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html index 3f113afec..33fb41061 100644 --- a/searx/templates/oscar/preferences.html +++ b/searx/templates/oscar/preferences.html @@ -12,7 +12,7 @@ {%- if stats[search_engine.name]['result_count'] -%}

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

{{- "" -}} {%- endif -%} - {%- if reliabilities[search_engine.name].errors -%} + {%- if reliabilities.get(search_engine.name, {}).errors or reliabilities.get(search_engine.name, {}).checker -%} {{ _('View error logs and submit a bug report') }} @@ -56,11 +56,11 @@ {% if checker_result or errors %} {{- "" -}} {{- "" -}} - - {%- if reliabilities[engine_name].checker %}{{ icon('exclamation-sign', 'The checker fails on the some tests') }}{% endif %} {{ r -}} + + {{ icon('exclamation-sign', 'The engine is not reliabled') }} {{ r -}} {{- "" -}} {{- "" -}} -