mirror of https://github.com/searxng/searxng.git
[fix] simple theme: move engine alerts in case of no results into sidebar
If there were no results but errors in the engines then the error dialogs of the engines was displayed in the result list. With the new design errors of the engines should only be displayed in the sidebar and at the same time duplications of the (template) code will be avoided. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
60b94dfdca
commit
3ca97cf5e3
|
@ -21,5 +21,3 @@
|
||||||
</div>
|
</div>
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,23 +1,5 @@
|
||||||
{% from 'simple/icons.html' import icon_big %}
|
{% from 'simple/icons.html' import icon_big %}
|
||||||
{% if unresponsive_engines %}
|
|
||||||
<div class="dialog-error" role="alert">
|
|
||||||
{{ icon_big('warning') }}
|
|
||||||
<div>
|
|
||||||
<p><strong>{{ _('Error!') }}</strong> {{ _('Engines cannot retrieve results.') }}</p>
|
|
||||||
{% for engine_name, error_type in unresponsive_engines %}
|
|
||||||
<p>{{- '' -}}
|
|
||||||
{{- engine_name }} (
|
|
||||||
<a href="{{ url_for('stats', engine=engine_name|e) }}" title="{{ _('View error logs and submit a bug report') }}">
|
|
||||||
{{- error_type -}}
|
|
||||||
</a> ){{- '' -}}
|
|
||||||
</p>
|
|
||||||
{%- endfor %}
|
|
||||||
<p><small>{{ _('Please, try again later or find another SearXNG instance.') }} (<a href="{{ get_setting('brand.public_instances') }}">{{ _('Public instances') }}</a>) </small></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% else %}
|
|
||||||
<div class="dialog-error" role="alert">
|
<div class="dialog-error" role="alert">
|
||||||
<p><strong>{{ _('Sorry!') }}</strong></p>
|
<p><strong>{{ _('Sorry!') }}</strong></p>
|
||||||
<p>{{ _("we didn't find any results. Please use another query or search in more categories.") }}</p>
|
<p>{{ _("we didn't find any results. Please use another query or search in more categories.") }}</p>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
{%- include 'simple/elements/search_url.html' -%}
|
{%- include 'simple/elements/search_url.html' -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
{%- if unresponsive_engines and results|length >= 1 -%}
|
{%- if unresponsive_engines -%}
|
||||||
{%- include 'simple/elements/engines_msg.html' -%}
|
{%- include 'simple/elements/engines_msg.html' -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue