libremiami-search/searx/templates/oscar/results.html

8.8 KiB

{% extends "oscar/base.html" %} {% macro search_form_attrs(pageno) -%} {%- for category in selected_categories -%}{%- endfor -%} {{- "" -}} {{- "" -}} {{- "" -}} {{- "" -}} {% if timeout_limit %}{% endif -%} {%- endmacro %} {%- macro search_url() %}{{ base_url }}?q={{ q|urlencode }}{% if selected_categories %}&categories={{ selected_categories|join(",") | replace(' ','+') }}{% endif %}{% if pageno > 1 %}&pageno={{ pageno }}{% endif %}{% if time_range %}&time_range={{ time_range }}{% endif %}{% if current_language != 'all' %}&language={{ current_language }}{% endif %}{% endmacro -%} {% block title %}{{ q|e }} - {% endblock %} {% block meta %}{{" "}}{% endblock %} {% block content %} {% include 'oscar/search.html' %}
{% if number_of_results != '0' -%}

{{ _('Number of results') }}: {{ number_of_results }}

{%- endif %} {% if unresponsive_engines and results|length >= 1 -%}

{{ _('Engines cannot retrieve results') }}:

{%- for engine_name, error_type in unresponsive_engines -%} {{- engine_name }} ({{ error_type }}){% if not loop.last %}, {% endif %}{{- "" -}} {%- endfor -%}
{%- endif %} {% if infoboxes -%} {% for infobox in infoboxes %} {% include 'oscar/infobox.html' %}{{- "\n\n" -}} {% endfor %} {%- endif %} {% if suggestions %}

{{ _('Suggestions') }}

{% for suggestion in suggestions %} {{ suggestion.title }} {% endfor %}
{%- endif %}
{{- "" -}}

{{ _('Links') }}

{{- "" -}}
{{- "" -}}
{{- "" -}} {{- "" -}} {{- "" -}}
{{- "" -}}
{% for output_type in ('csv', 'json', 'rss') %} {{- search_form_attrs(pageno) -}} {{- "" -}} {{ output_type }}{{- "" -}} {% endfor %}

{{ _('Search results') }}

{% if corrections -%}
{{ _('Try searching for:') }} {% for correction in corrections -%} {{- "" -}} {{- "" -}} {{ correction.title }}{{- "" -}} {% endfor %}
{%- endif %} {% if answers -%} {%- for answer in answers.values() %}
{% if answer.url %} {{ answer.answer }} {% else %} {{ answer.answer }} {% endif %}
{%- endfor %} {%- endif %} {% for result in results -%}
{%- set index = loop.index -%} {%- if result.template -%} {% include get_result_template('oscar', result['template']) %} {%- else -%} {% include 'oscar/result_templates/default.html' %} {%- endif -%}
{% endfor %} {% if not results and not answers -%} {% include 'oscar/messages/no_results.html' %} {% endif %}
{% if paging -%} {% if rtl %}
{{- "" -}} {{- search_form_attrs(pageno+1) -}} {{ _('next page') }}{{- "" -}} {{- "" -}}
{{- "" -}} {{- search_form_attrs(pageno-1) -}} {{ _('previous page') }}{{- "" -}} {{- "" -}}
{% else %}
{{- "" -}} {{- search_form_attrs(pageno-1) -}} {{ _('previous page') }}{{- "" -}} {{- "" -}}
{{- "" -}} {{- search_form_attrs(pageno+1) -}} {{ _('next page') }}{{- "" -}} {{- "" -}}
{% endif %} {% endif %}
{% endblock %}