2020-08-27 21:55:47 +02:00
{% from 'oscar/macros.html' import preferences_item_header, preferences_item_header_rtl, preferences_item_footer, preferences_item_footer_rtl, checkbox_toggle, support_toggle, custom_select_class %}
2014-09-22 22:42:29 +02:00
{% extends "oscar/base.html" %}
2021-04-14 18:11:35 +02:00
{%- macro engine_about(search_engine, id) -%}
{% if search_engine.about is defined or stats[search_engine.name]['result_count'] > 0 %}
2021-03-16 16:47:05 +01:00
{% set about = search_engine.about %}
< div class = "engine-tooltip" role = "tooltip" id = "{{ id }}" > {{- "" -}}
2021-09-18 11:01:39 +02:00
< p class = "description" > < / p >
2021-04-14 18:11:35 +02:00
{% if search_engine.about is defined %}
< h5 > < a href = "{{about.website}}" rel = "noreferrer" > {{about.website}}< / a > < / h5 >
{%- if about.wikidata_id -%}< p > < a href = "https://www.wikidata.org/wiki/{{about.wikidata_id}}" rel = "noreferrer" > wikidata.org/wiki/{{about.wikidata_id}}< / a > < / p > {%- endif -%}
{% endif %}
2021-03-16 16:47:05 +01:00
{%- if search_engine.enable_http %}< p > {{ icon('exclamation-sign', 'No HTTPS') }}{{ _('No HTTPS')}}< / p > {% endif -%}
2021-04-14 18:11:35 +02:00
{%- if stats[search_engine.name]['result_count'] -%}
< p > {{ _('Number of results') }}: {{ stats[search_engine.name]['result_count'] }} ( {{ _('Avg.') }} )< / p > {{- "" -}}
{%- endif -%}
2021-04-30 11:49:39 +02:00
{%- if reliabilities.get(search_engine.name, {}).errors or reliabilities.get(search_engine.name, {}).checker -%}
2021-04-28 17:54:43 +02:00
< a href = "{{ url_for('stats', engine=search_engine.name|e) }}" title = "{{ _('View error logs and submit a bug report') }}" >
{{ _('View error logs and submit a bug report') }}
< / a >
{%- endif -%}
2021-03-16 16:47:05 +01:00
< / div >
{%- endif -%}
{%- endmacro %}
2021-04-14 18:11:35 +02:00
{%- macro engine_time(engine_name, css_align_class) -%}
2021-09-06 14:56:00 +02:00
< td class = "{{ label }}" > {{- "" -}}
2021-04-14 18:11:35 +02:00
{%- if stats[engine_name].time != None -%}
< span class = "stacked-bar-chart-value" > {{- stats[engine_name].time -}}< / span > {{- "" -}}
2021-05-19 11:28:57 +02:00
< span class = "stacked-bar-chart" aria-labelledby = "{{engine_name}}_chart" aria-hidden = "true" >
{%- if max_rate95 is not none and max_rate95 > 0 -%}
2021-09-05 16:03:00 +02:00
< div class = "stacked-bar-chart-median bar{{ (100 * (stats[engine_name].time / max_rate95))|round }}" > < / div > {{- "" -}}
< div class = "stacked-bar-chart-rate80 bar{{ (100 * ((stats[engine_name].rate80 - stats[engine_name].time) / max_rate95))|round }}" > < / div > {{- "" -}}
< div class = "stacked-bar-chart-rate95 bar{{ (100 * ((stats[engine_name].rate95 - stats[engine_name].rate80) / max_rate95))|round }}" > < / div > {{- "" -}}
2021-05-19 11:28:57 +02:00
< span class = "stacked-bar-chart-rate100" > < / span >
{%- endif -%}
2021-04-14 18:11:35 +02:00
< / span > {{- "" -}}
< div class = "engine-tooltip text-left" role = "tooltip" id = "{{engine_name}}_graph" > {{- "" -}}
< p > {{ _('Median') }}: {{ stats[engine_name].time }}< / p > {{- "" -}}
< p > {{ _('P80') }}: {{ stats[engine_name].rate80 }}< / p > {{- "" -}}
< p > {{ _('P95') }}: {{ stats[engine_name].rate95 }}< / p > {{- "" -}}
< / div >
{%- endif -%}
< / td >
{%- endmacro -%}
{%- macro engine_reliability(engine_name, css_align_class) -%}
{% set r = reliabilities.get(engine_name, {}).get('reliablity', None) %}
{% set checker_result = reliabilities.get(engine_name, {}).get('checker', []) %}
{% set errors = reliabilities.get(engine_name, {}).get('errors', []) %}
{% if r != None %}
{% if r < = 50 %}{% set label = 'danger' %}
{% elif r < 80 % } { % set label = 'warning' % }
{% elif r < 90 % } { % set label = 'default' % }
{% else %}{% set label = 'success' %}
{% endif %}
{% else %}
{% set r = '' %}
{% endif %}
{% if checker_result or errors %}
< td class = "{{ css_align_class }} {{ label }}" > {{- "" -}}
2021-04-25 14:19:35 +02:00
< a href = "{{ url_for('stats', engine=engine_name|e) }}" > {{- "" -}}
2021-04-30 11:49:39 +02:00
< span aria-labelledby = "{{engine_name}}_reliability" >
{{ icon('exclamation-sign', 'The engine is not reliabled') }} {{ r -}}
2021-04-25 14:19:35 +02:00
< / span > {{- "" -}}
< / a > {{- "" -}}
2021-04-30 11:49:39 +02:00
< div class = "engine-tooltip text-left" role = "tooltip" id = "{{engine_name}}_reliability" >
2021-04-14 18:11:35 +02:00
{%- if checker_result -%}
< p > {{ _("Failed checker test(s): ") }} {{ ', '.join(checker_result) }}< / p >
{%- endif -%}
{%- for error in errors -%}
< p > {{ error }} < / p > {{- "" -}}
{%- endfor -%}
< / div > {{- "" -}}
< / td >
{%- else -%}
< td class = "{{ css_align_class }} {{ label }}" > < span > {{ r }}< / span > < / td >
{%- endif -%}
{%- endmacro -%}
2021-06-01 16:21:56 +02:00
{%- macro plugin_of_category(plugin_category) -%}
{%- for plugin in plugins -%}
{%- if plugin.preference_section == plugin_category -%}
{{- preferences_item_header(_(plugin.description), _(plugin.name), rtl, 'plugin_' + plugin.id) -}}
{{- checkbox_toggle('plugin_' + plugin.id, plugin.id not in allowed_plugins) -}}
{{- preferences_item_footer(_(plugin.description), _(plugin.name), rtl) -}}
{%- endif -%}
{%- endfor -%}
{% endmacro %}
2021-04-14 18:11:35 +02:00
{%- block title %}{{ _('preferences') }} - {% endblock -%}
2014-09-22 22:42:29 +02:00
{% block content %}
2017-10-06 21:50:59 +02:00
2014-09-22 22:42:29 +02:00
< div >
< h1 > {{ _('Preferences') }}< / h1 >
2022-02-04 21:04:50 +01:00
< form method = "post" action = "{{ url_for('preferences') }}" id = "search_form" autocomplete = "off" >
2014-09-22 22:42:29 +02:00
2015-04-26 20:09:28 +02:00
<!-- Nav tabs -->
2020-05-15 10:16:49 +02:00
< ul class = "nav nav-tabs nav-justified hide_if_nojs" role = "tablist" >
2015-04-26 20:09:28 +02:00
< li class = "active" > < a href = "#tab_general" role = "tab" data-toggle = "tab" > {{ _('General') }}< / a > < / li >
2021-06-01 16:21:56 +02:00
< li > < a href = "#tab_ui" role = "tab" data-toggle = "tab" > {{ _('User Interface') }}< / a > < / li >
< li > < a href = "#tab_privacy" role = "tab" data-toggle = "tab" > {{ _('Privacy') }}< / a > < / li >
2015-04-26 20:09:28 +02:00
< li > < a href = "#tab_engine" role = "tab" data-toggle = "tab" > {{ _('Engines') }}< / a > < / li >
2021-06-01 16:21:56 +02:00
< li > < a href = "#tab_query" role = "tab" data-toggle = "tab" > {{ _('Special Queries') }}< / a > < / li >
2015-02-18 18:31:01 +01:00
< li > < a href = "#tab_cookies" role = "tab" data-toggle = "tab" > {{ _('Cookies') }}< / a > < / li >
2015-04-26 20:09:28 +02:00
< / ul >
2014-09-22 22:42:29 +02:00
2015-04-26 20:09:28 +02:00
<!-- Tab panes -->
< noscript >
< h3 > {{ _('General') }}< / h3 >
< / noscript >
< div class = "tab-content" >
< div class = "tab-pane active" id = "tab_general" >
< fieldset >
< div class = "container-fluid" >
2020-10-23 16:22:55 +02:00
{% if 'categories' not in locked_preferences %}
2015-04-26 20:09:28 +02:00
< div class = "row form-group" >
{% if rtl %}
< div class = "col-sm-11 col-md-10" >
{% include 'oscar/categories.html' %}
< / div >
2020-06-25 17:32:05 +02:00
< label class = "col-sm-3 col-md-2" for = "categories" > {{ _('Default categories') }}< / label >
2015-04-26 20:09:28 +02:00
{% else %}
2020-06-25 17:32:05 +02:00
< label class = "col-sm-3 col-md-2" for = "categories" > {{ _('Default categories') }}< / label >
2016-07-17 18:43:47 +02:00
< div class = "col-sm-11 col-md-10 search-categories" >
2015-04-26 20:09:28 +02:00
{% include 'oscar/categories.html' %}
< / div >
{% endif %}
2014-09-22 22:42:29 +02:00
< / div >
2020-10-23 16:22:55 +02:00
{% endif %}
{% if 'language' not in locked_preferences %}
2015-04-26 20:09:28 +02:00
{% set language_label = _('Search language') %}
{% set language_info = _('What language do you prefer for search?') %}
2020-06-25 17:32:05 +02:00
{{ preferences_item_header(language_info, language_label, rtl, 'language') }}
2019-12-10 18:10:33 +01:00
{% include 'oscar/languages.html' %}
2015-04-26 20:09:28 +02:00
{{ preferences_item_footer(language_info, language_label, rtl) }}
2020-10-23 16:22:55 +02:00
{% endif %}
2015-01-16 16:58:44 +01:00
2020-10-23 16:22:55 +02:00
{% if 'safesearch' not in locked_preferences %}
2015-04-26 20:09:28 +02:00
{% set safesearch_label = _('SafeSearch') %}
{% set safesearch_info = _('Filter content') %}
2020-06-25 17:32:05 +02:00
{{ preferences_item_header(safesearch_info, safesearch_label, rtl, 'safesearch') }}
2020-08-27 21:55:47 +02:00
< select class = "form-control {{ custom_select_class(rtl) }}" name = "safesearch" id = "safesearch" >
2015-04-26 20:09:28 +02:00
< option value = "2" { % if safesearch = = ' 2 ' % } selected = "selected" { % endif % } > {{ _('Strict') }}< / option >
< option value = "1" { % if safesearch = = ' 1 ' % } selected = "selected" { % endif % } > {{ _('Moderate') }}< / option >
< option value = "0" { % if safesearch = = ' 0 ' % } selected = "selected" { % endif % } > {{ _('None') }}< / option >
< / select >
{{ preferences_item_footer(safesearch_info, safesearch_label, rtl) }}
2020-10-23 16:22:55 +02:00
{% endif %}
2015-02-10 15:23:56 +01:00
2021-06-01 16:21:56 +02:00
{% if 'autocomplete' not in locked_preferences %}
{% set autocomplete_label = _('Autocomplete') %}
{% set autocomplete_info = _('Find stuff as you type') %}
{{ preferences_item_header(autocomplete_info, autocomplete_label, rtl, 'autocomplete') }}
< select class = "form-control {{ custom_select_class(rtl) }}" name = "autocomplete" id = "autocomplete" >
< option value = "" > - < / option >
{% for backend in autocomplete_backends %}
< option value = "{{ backend }}" { % if backend = = autocomplete % } selected = "selected" { % endif % } > {{ backend }}< / option >
2015-04-26 20:09:28 +02:00
{% endfor %}
< / select >
2021-06-01 16:21:56 +02:00
{{ preferences_item_footer(autocomplete_info, autocomplete_label, rtl) }}
2020-10-23 16:22:55 +02:00
{% endif %}
2017-11-01 13:58:48 +01:00
2021-06-01 16:21:56 +02:00
{{ plugin_of_category('general' )}}
2020-11-22 18:00:21 +01:00
2020-10-23 16:22:55 +02:00
{% if 'doi_resolver' not in locked_preferences %}
2017-11-01 13:58:48 +01:00
{% set label = _('Open Access DOI resolver') %}
{% set info = _('Redirect to open-access versions of publications when available (plugin required)') %}
2020-06-25 17:32:05 +02:00
{{ preferences_item_header(info, label, rtl, 'doi_resolver') }}
2020-08-27 21:55:47 +02:00
< select class = "form-control {{ custom_select_class(rtl) }}" name = "doi_resolver" id = "doi_resolver" >
2017-11-01 13:58:48 +01:00
{% for doi_resolver_name,doi_resolver_url in doi_resolvers.items() %}
2021-04-04 13:36:33 +02:00
< option value = "{{ doi_resolver_name }}" { % if doi_resolver_url = = current_doi_resolver % } selected = "selected" { % endif % } >
2017-11-01 13:58:48 +01:00
{{ doi_resolver_name }} - {{ doi_resolver_url }}
< / option >
{% endfor %}
< / select >
{{ preferences_item_footer(info, label, rtl) }}
2020-10-23 16:22:55 +02:00
{% endif %}
2020-02-01 11:01:17 +01:00
2021-06-01 16:21:56 +02:00
{{ plugin_of_category('onion' )}}
2020-02-01 11:01:17 +01:00
{% set label = _('Engine tokens') %}
{% set info = _('Access tokens for private engines') %}
2020-06-25 17:32:05 +02:00
{{ preferences_item_header(info, label, rtl, 'tokens') }}
2021-11-12 11:38:28 +01:00
< input class = "form-control" id = "tokens" name = "tokens" value = '{{ preferences.tokens.get_value() }}' autocomplete = "off" spellcheck = "false" autocorrect = "off" / >
2020-02-01 11:01:17 +01:00
{{ preferences_item_footer(info, label, rtl) }}
2015-04-26 20:09:28 +02:00
< / div >
< / fieldset >
2014-09-22 22:42:29 +02:00
< / div >
2021-06-01 16:21:56 +02:00
< div class = "tab-pane active_if_nojs" id = "tab_ui" >
2015-04-26 20:09:28 +02:00
< noscript >
2021-06-01 16:21:56 +02:00
< h3 > {{ _('User Interface') }}< / h3 >
2015-04-26 20:09:28 +02:00
< / noscript >
< fieldset >
2015-04-26 20:14:40 +02:00
< div class = "container-fluid" >
2021-06-01 16:21:56 +02:00
{% if 'locale' not in locked_preferences %}
{% set locale_label = _('Interface language') %}
{% set locale_info = _('Change the language of the layout') %}
{{ preferences_item_header(locale_info, locale_label, rtl, 'locale') }}
< select class = "form-control {{ custom_select_class(rtl)}}" name = "locale" id = "locale" >
{% for locale_id,locale_name in locales.items() | sort %}
< option value = "{{ locale_id }}" { % if locale_id = = current_locale % } selected = "selected" { % endif % } > {{ locale_name }}< / option >
{% endfor %}
< / select >
{{ preferences_item_footer(locale_info, locale_label, rtl) }}
2020-10-19 08:55:57 +02:00
{% endif %}
2021-06-01 16:21:56 +02:00
{% if 'theme' not in locked_preferences %}
2021-10-15 21:11:32 +02:00
{% set theme_label = _('Theme') %}
2021-09-30 17:55:22 +02:00
{% set theme_info = _('Change SearXNG layout') %}
2021-06-01 16:21:56 +02:00
{{ preferences_item_header(theme_info, theme_label, rtl, 'theme') }}
< select class = "form-control {{ custom_select_class(rtl) }}" name = "theme" id = "theme" >
{% for name in themes %}
< option value = "{{ name }}" { % if name = = theme % } selected = "selected" { % endif % } > {{ name }}< / option >
{% endfor %}
< / select >
{{ preferences_item_footer(theme_info, theme_label, rtl) }}
{% endif %}
{% if 'oscar-style' not in locked_preferences %}
{{ preferences_item_header(_('Choose style for this theme'), _('Style'), rtl, 'oscar_style') }}
< select class = "form-control {{ custom_select_class(rtl) }}" name = "oscar-style" id = "oscar_style" >
< option value = "logicodev" > Logicodev< / option >
< option value = "pointhi" { % if preferences . get_value ( ' oscar-style ' ) = = ' pointhi ' % } selected = "selected" { % endif % } > Pointhi< / option >
< option value = "logicodev-dark" { % if preferences . get_value ( ' oscar-style ' ) = = ' logicodev-dark ' % } selected = "selected" { % endif % } > Logicodev dark< / option >
< / select >
{{ preferences_item_footer(_('Choose style for this theme'), _('Style'), rtl) }}
{% endif %}
{% set label = _('Show advanced settings') %}
{% set info = _('Show advanced settings panel in the home page by default') %}
{{ preferences_item_header(info, label, rtl, 'advanced_search') }}
< select class = "form-control {{ custom_select_class(rtl) }}" name = "advanced_search" id = "advanced_search" >
< option value = "1" { % if preferences . get_value ( ' advanced_search ' ) % } selected = "selected" { % endif % } > {{ _('On') }}< / option >
< option value = "0" { % if not preferences . get_value ( ' advanced_search ' ) % } selected = "selected" { % endif % } > {{ _('Off')}}< / option >
< / select >
{{ preferences_item_footer(info, label, rtl) }}
{% if 'results_on_new_tab' not in locked_preferences %}
{% set label = _('Results on new tabs') %}
{% set info = _('Open result links on new browser tabs') %}
{{ preferences_item_header(info, label, rtl, 'results_on_new_tab') }}
< select class = "form-control {{ custom_select_class(rtl) }}" name = "results_on_new_tab" id = "results_on_new_tab" >
< option value = "1" { % if results_on_new_tab % } selected = "selected" { % endif % } > {{ _('On') }}< / option >
< option value = "0" { % if not results_on_new_tab % } selected = "selected" { % endif % } > {{ _('Off')}}< / option >
< / select >
{{ preferences_item_footer(info, label, rtl) }}
{% endif %}
2022-01-23 11:37:57 +01:00
{% if 'infinite_scroll' not in locked_preferences %}
{% set label = _('Infinite scroll') %}
{% set info = _('Automatically load next page when scrolling to bottom of current page') %}
{{ preferences_item_header(info, label, rtl, 'infinite_scroll') }}
< select class = "form-control {{ custom_select_class(rtl) }}" name = "infinite_scroll" id = "infinite_scroll" >
< option value = "1" { % if infinite_scroll % } selected = "selected" { % endif % } > {{ _('On') }}< / option >
< option value = "0" { % if not infinite_scroll % } selected = "selected" { % endif % } > {{ _('Off')}}< / option >
< / select >
{{ preferences_item_footer(info, label, rtl) }}
{% endif %}
2021-06-01 16:21:56 +02:00
{{ plugin_of_category('ui' )}}
2015-03-11 18:57:36 +01:00
< / div >
2015-04-26 20:14:40 +02:00
< / fieldset >
< / div >
2021-06-01 16:21:56 +02:00
< div class = "tab-pane active_if_nojs" id = "tab_privacy" >
< noscript >
< h3 > {{ _('Privacy') }}< / h3 >
< / noscript >
< fieldset >
< div class = "container-fluid" >
{% if 'method' not in locked_preferences %}
2022-01-14 08:29:04 +01:00
{% set method_label = _('HTTP Method') %}
2021-06-01 16:21:56 +02:00
{% set method_info = _('Change how forms are submited, < a href = "http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods" rel = "external" > learn more about request methods< / a > ') %}
{{ preferences_item_header(method_info, method_label, rtl, 'method') }}
< select class = "form-control {{ custom_select_class(rtl) }}" name = "method" id = "method" >
< option value = "POST" { % if method = = ' POST ' % } selected = "selected" { % endif % } > POST< / option >
< option value = "GET" { % if method = = ' GET ' % } selected = "selected" { % endif % } > GET< / option >
< / select >
{{ preferences_item_footer(method_info, method_label, rtl) }}
{% endif %}
{% if 'image_proxy' not in locked_preferences %}
{% set image_proxy_label = _('Image proxy') %}
2021-09-30 17:55:22 +02:00
{% set image_proxy_info = _('Proxying image results through SearXNG') %}
2021-06-01 16:21:56 +02:00
{{ preferences_item_header(image_proxy_info, image_proxy_label, rtl, 'image_proxy') }}
< select class = "form-control {{ custom_select_class(rtl) }}" name = "image_proxy" id = "image_proxy" >
< option value = "1" { % if image_proxy % } selected = "selected" { % endif % } > {{ _('Enabled') }}< / option >
< option value = "" { % if not image_proxy % } selected = "selected" { % endif % } > {{ _('Disabled')}}< / option >
< / select >
{{ preferences_item_footer(image_proxy_info, image_proxy_label, rtl) }}
{% endif %}
2015-02-18 18:31:01 +01:00
2021-11-06 12:26:48 +01:00
{% if 'query_in_title' not in locked_preferences %}
2021-11-24 17:40:03 +01:00
{% set query_in_title_label = _("Query in the page's title") %}
{% set query_in_title_info = _("When enabled, the result page's title contains your query. Your browser can record this title") %}
2021-11-06 12:26:48 +01:00
{{ preferences_item_header(query_in_title_info, query_in_title_label, rtl, 'query_in_title') }}
< select class = "form-control {{ custom_select_class(rtl) }}" name = "query_in_title" id = "query_in_title" >
< option value = "1" { % if query_in_title % } selected = "selected" { % endif % } > {{ _('Enabled') }}< / option >
< option value = "" { % if not query_in_title % } selected = "selected" { % endif % } > {{ _('Disabled')}}< / option >
< / select >
{{ preferences_item_footer(query_in_title_info, query_in_title_label, rtl) }}
{% endif %}
2021-06-01 16:21:56 +02:00
{{ plugin_of_category('privacy' )}}
< / div >
< / fieldset >
< / div >
2021-06-16 18:28:25 +02:00
< div class = "tab-pane active_if_nojs" id = "tab_engine" >
<!-- Nav tabs -->
< ul class = "nav nav-tabs nav-justified hide_if_nojs" role = "tablist" >
2021-12-28 16:12:54 +01:00
{% for categ in categories_as_tabs + [OTHER_CATEGORY] %}
2021-06-16 18:28:25 +02:00
< li { % if loop . first % } class = "active" { % endif % } > < a href = "#tab_engine_{{ categ|replace(' ', '_') }}" role = "tab" data-toggle = "tab" > {{ _(categ) }}< / a > < / li >
{% endfor %}
< / ul >
< noscript >
< h3 > {{ _('Engines') }}< / h3 >
< / noscript >
<!-- Tab panes -->
< div class = "tab-content" >
< div class = "hide_if_nojs" >
< p class = "text-{% if rtl %}left{% else %}right{% endif %}" >
< button type = "button" class = "btn btn-default btn-success" id = "allow-all-engines" > {{ _("Allow all") }}< / button >
< button type = "button" class = "btn btn-default btn-danger" id = "disable-all-engines" > {{ _("Disable all") }}< / button >
< / p >
< / div >
2021-12-28 16:12:54 +01:00
{% for categ in categories_as_tabs + [OTHER_CATEGORY] %}
2021-06-16 18:28:25 +02:00
< noscript > < label > {{ _(categ) }}< / label >
< / noscript >
< div class = "tab-pane{% if loop.first %} active{% endif %} active_if_nojs" id = "tab_engine_{{ categ|replace(' ', '_') }}" >
2022-01-03 21:37:17 +01:00
{% if categ == OTHER_CATEGORY %}
2022-01-12 08:25:59 +01:00
< p > {{_('This tab does not show up for search results, but you can search the engines listed here via bangs.')}}< / p >
2022-01-03 21:37:17 +01:00
{% endif %}
2021-06-16 18:28:25 +02:00
< div class = "container-fluid" >
< fieldset >
< div class = "table-responsive" >
< table class = "table table-hover table-condensed table-striped" >
< tr >
{% if not rtl %}
< th scope = "col" > {{ _("Allow") }}< / th >
< th scope = "col" > {{ _("Engine name") }}< / th >
< th scope = "col" > {{ _("Shortcut") }}< / th >
2021-09-07 12:26:07 +02:00
< th scope = "col" class = "col-stat" > {{ _("Selected language") }}< / th >
< th scope = "col" class = "col-stat" > {{ _("SafeSearch") }}< / th >
< th scope = "col" class = "col-stat" > {{ _("Time range") }}< / th >
2021-06-16 18:28:25 +02:00
< th scope = "col" > {{ _("Response time") }}< / th >
2021-09-07 12:26:07 +02:00
< th scope = "col" class = "col-stat text-right" > {{ _("Max time") }}< / th >
2021-10-15 21:11:32 +02:00
< th scope = "col" class = "col-stat text-right" > {{ _("Reliability") }}< / th >
2021-06-16 18:28:25 +02:00
{% else %}
2021-10-15 21:11:32 +02:00
< th scope = "col" class = "col-stat" > {{ _("Reliability") }}< / th >
2021-09-07 12:26:07 +02:00
< th scope = "col" class = "col-stat" > {{ _("Max time") }}< / th >
2021-06-16 18:28:25 +02:00
< th scope = "col" class = "text-right" > {{ _("Response time") }}< / th >
< th scope = "col" class = "text-right" > {{ _("Time range") }}< / th >
< th scope = "col" class = "text-right" > {{ _("SafeSearch") }}< / th >
< th scope = "col" class = "text-right" > {{ _("Selected language") }}< / th >
< th scope = "col" class = "text-right" > {{ _("Shortcut") }}< / th >
< th scope = "col" class = "text-right" > {{ _("Engine name") }}< / th >
< th scope = "col" class = "text-right" > {{ _("Allow") }}< / th >
{% endif %}
< / tr >
2021-12-28 14:51:21 +01:00
{% for group, engines in engines_by_category[categ] | group_engines_in_tab %}
{% if loop.length > 1 %}
< tr > < th colspan = "9" > {{_(group)}}< / th > < / tr >
{% endif %}
{% for search_engine in engines %}
2021-06-16 18:28:25 +02:00
{% if not search_engine.private %}
< tr >
{% if not rtl %}
< td class = "onoff-checkbox" >
{{- checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) -}}
< / td >
2021-09-18 11:01:39 +02:00
< th scope = "row" data-engine-name = "{{ search_engine.name }}" > < span aria-labelledby = "{{ 'tooltip_' + categ + '_' + search_engine.name }}" >
2021-06-16 18:28:25 +02:00
{%- if search_engine.enable_http %}{{ icon('exclamation-sign', 'No HTTPS') }}{% endif -%}
2021-12-25 19:34:07 +01:00
{{- search_engine.name -}}
{%- if search_engine.about and search_engine.about.language %}
({{search_engine.about.language | upper}})
{%- endif %}
< / span >
2021-06-16 18:28:25 +02:00
{{- engine_about(search_engine, 'tooltip_' + categ + '_' + search_engine.name) -}}
< / th >
< td class = "name" > {{ shortcuts[search_engine.name] }}< / td >
< td > {{ support_toggle(supports[search_engine.name]['supports_selected_language']) }}< / td >
< td > {{ support_toggle(supports[search_engine.name]['safesearch']) }}< / td >
< td > {{ support_toggle(supports[search_engine.name]['time_range_support']) }}< / td >
{{ engine_time(search_engine.name, 'text-right') }}
< td class = "text-right {{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}" > {% if stats[search_engine.name]['warn_timeout'] %}{{ icon('exclamation-sign') }} {% endif %}{{ search_engine.timeout }}< / td >
{{ engine_reliability(search_engine.name, 'text-right ') }}
{% else %}
{{ engine_reliability(search_engine.name, 'text-left') }}
< td class = "text-left {{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}" > {{ search_engine.timeout }}{% if stats[search_engine.name]['warn_time'] %} {{ icon('exclamation-sign')}}{% endif %}< / td >
{{ engine_time(search_engine.name, 'text-left') }}
< td > {{ support_toggle(supports[search_engine.name]['time_range_support']) }}< / td >
< td > {{ support_toggle(supports[search_engine.name]['safesearch']) }}< / td >
< td > {{ support_toggle(supports[search_engine.name]['supports_selected_language']) }}< / td >
< td > {{ shortcuts[search_engine.name] }}< / td >
2021-09-18 11:01:39 +02:00
< th scope = "row" data-engine-name = "{{ search_engine.name }}" > < span > {% if search_engine.enable_http %}{{ icon('exclamation-sign', 'No HTTPS') }}{% endif %}{{ search_engine.name }}< / span > {{ engine_about(search_engine) }}< / th >
2021-06-16 18:28:25 +02:00
< td class = "onoff-checkbox" >
{{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}
< / td >
{% endif %}
< / tr >
{% endif %}
2021-12-28 14:51:21 +01:00
{% endfor %}
2021-06-16 18:28:25 +02:00
{% endfor %}
< / table >
< / div >
< / fieldset >
< / div >
< / div >
{% endfor %}
< / div >
< / div >
2021-06-01 16:21:56 +02:00
< div class = "tab-pane active_if_nojs" id = "tab_query" >
2016-11-19 20:53:51 +01:00
< noscript >
2021-06-01 16:21:56 +02:00
< h3 > {{ _('Query') }}< / h3 >
2016-11-19 20:53:51 +01:00
< / noscript >
2021-06-01 16:21:56 +02:00
{% if answerers %}
2016-11-19 20:53:51 +01:00
< table class = "table table-striped" >
2021-06-01 16:21:56 +02:00
< thead >
< tr >
< th { % if rtl % } class = "text-right" { % endif % } > {{ _('Allow') }}< / th >
< th { % if rtl % } class = "text-right" { % endif % } > {{ _('Keywords') }}< / th >
< th { % if rtl % } class = "text-right" { % endif % } > {{ _('Name') }}< / th >
< th { % if rtl % } class = "text-right" { % endif % } > {{ _('Description') }}< / th >
< th { % if rtl % } class = "text-right" { % endif % } > {{ _('Examples') }}< / th >
< / tr >
< / thead >
< tbody >
< td > < / td >
2021-11-24 17:40:03 +01:00
< th scope = "colgroup" colspan = "4" > {{ _("This is the list of SearXNG's instant answering modules.") }}< / th >
2021-06-01 16:21:56 +02:00
{% for answerer in answerers %}
< tr >
< td > < / td >
< td > {{ answerer.keywords|join(', ') }}< / td >
< td > {{ answerer.info.name }}< / td >
< td > {{ answerer.info.description }}< / td >
< td > {{ answerer.info.examples|join(', ') }}< / td >
< / tr >
{% endfor %}
< / tbody >
< tbody >
< td > < / td >
< th scope = "colgroup" colspan = "4" > {{ _('This is the list of plugins.') }}< / th >
{%- for plugin in plugins -%}
{%- if plugin.preference_section == 'query' -%}
< tr >
< td > {{- checkbox_toggle('plugin_' + plugin.id, plugin.id not in allowed_plugins) -}}< / td >
< td > {{ plugin.query_keywords|join(', ') }}< / td >
< td > {{ _(plugin.name) }}< / td >
< td > {{ _(plugin.description) }}< / td >
< td > {{ plugin.query_examples }}< / td >
< / tr >
{%- endif -%}
{%- endfor -%}
< / tbody >
2016-11-19 20:53:51 +01:00
< / table >
2021-06-01 16:21:56 +02:00
{% endif %}
2016-11-19 20:53:51 +01:00
< / div >
2015-02-18 18:31:01 +01:00
< div class = "tab-pane active_if_nojs" id = "tab_cookies" >
< noscript >
< h3 > {{ _('Cookies') }}< / h3 >
< / noscript >
2020-05-15 10:16:49 +02:00
< p class = "text-muted" >
2021-09-30 17:55:22 +02:00
{{ _('This is the list of cookies and their values SearXNG is storing on your computer.') }}< br / >
{{ _('With that list, you can assess SearXNG transparency.') }}< br / >
2015-02-18 18:31:01 +01:00
< / p >
2015-06-05 09:07:59 +02:00
{% if cookies %}
< table class = "table table-striped" >
< tr >
2020-06-01 09:18:51 +02:00
< th class = "text-muted{% if rtl %} text-right{% endif %}" > {{ _('Cookie name') }}< / th >
2020-05-31 20:02:58 +02:00
< th class = "text-muted{% if rtl %} text-right{% endif %}" > {{ _('Value') }}< / th >
2015-06-05 09:07:59 +02:00
< / tr >
2015-02-18 18:31:01 +01:00
{% for cookie in cookies %}
2015-06-05 09:07:59 +02:00
< tr >
2020-05-15 10:16:49 +02:00
< td class = "text-muted" > {{ cookie }}< / td >
2015-06-05 09:07:59 +02:00
< td class = "text-muted" > {{ cookies[cookie] }}< / td >
< / tr >
2015-04-26 20:09:28 +02:00
{% endfor %}
2015-06-05 09:07:59 +02:00
< / table >
{% else %}
{% include 'oscar/messages/no_cookies.html' %}
{% endif %}
2015-03-11 18:57:36 +01:00
< / div >
< / div >
2020-05-15 10:16:49 +02:00
2021-04-28 17:54:43 +02:00
< p class = "text-muted" >
{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
2020-05-15 10:16:49 +02:00
{{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
2015-04-26 20:09:28 +02:00
< / p >
2020-05-15 10:16:49 +02:00
< p >
2021-04-28 17:54:43 +02:00
{{ _('Search URL of the currently saved preferences') }}
< small class = "text-muted" > ({{ _('Note: specifying custom settings in the search URL can reduce privacy by leaking data to the clicked result sites.') }})< / small > :
2017-07-10 12:47:25 +02:00
< / p >
2014-09-22 22:42:29 +02:00
2021-04-28 17:54:43 +02:00
< div class = "tab-pane" >
2021-04-12 16:02:16 +02:00
< input readonly = "" class = "form-control select-all-on-click cursor-text" type = "url" value = "{{ url_for('index', _external=True) }}?preferences={{ preferences_url_params|e }}{% raw %}&q=%s{% endraw %}" >
2020-05-15 10:16:49 +02:00
< input type = "submit" class = "btn btn-primary" value = "{{ _('save') }}" / >
2015-04-26 20:09:28 +02:00
< a href = "{{ url_for('index') }}" > < div class = "btn btn-default" > {{ _('back') }}< / div > < / a >
< a href = "{{ url_for('clear_cookies') }}" > < div class = "btn btn-default" > {{ _('Reset defaults') }}< / div > < / a >
2021-04-28 17:54:43 +02:00
< / div >
2015-01-16 16:58:44 +01:00
< / form >
2014-09-22 22:42:29 +02:00
< / div >
{% endblock %}