2014-09-22 20:42:29 +00:00
{% extends "oscar/base.html" %}
2014-09-26 16:26:46 +00:00
{% block title %}{{ _('preferences') }} - {% endblock %}
2015-01-18 12:03:53 +00:00
{% block site_alert_warning_nojs %}
< noscript >
{% include 'oscar/messages/js_disabled.html' %}
< / noscript >
{% endblock %}
2014-09-22 20:42:29 +00:00
{% block content %}
< div >
< h1 > {{ _('Preferences') }}< / h1 >
< form method = "post" action = "{{ url_for('preferences') }}" id = "search_form" >
<!-- Nav tabs -->
2014-11-03 21:18:40 +00:00
< ul class = "nav nav-tabs hide_if_nojs" role = "tablist" style = "margin-bottom:20px;" >
2014-09-22 20:42:29 +00:00
< li class = "active" > < a href = "#tab_general" role = "tab" data-toggle = "tab" > {{ _('General') }}< / a > < / li >
2015-01-18 11:00:38 +00:00
< li > < a href = "#tab_template" role = "tab" data-toggle = "tab" > {{ _('Template features') }}< / a > < / li >
2014-09-22 20:42:29 +00:00
< li > < a href = "#tab_engine" role = "tab" data-toggle = "tab" > {{ _('Engines') }}< / a > < / li >
< / ul >
<!-- Tab panes -->
2014-11-03 21:18:40 +00:00
< noscript >
< h3 > {{ _('General') }}< / h3 >
< / noscript >
2014-09-22 20:42:29 +00:00
< div class = "tab-content" >
< div class = "tab-pane active" id = "tab_general" >
< fieldset >
< div class = "container-fluid" >
2014-09-26 20:43:54 +00:00
< div class = "row form-group" >
< label class = "col-sm-3 col-md-2" > {{ _('Default categories') }}< / label >
< div class = "col-sm-11 col-md-10" >
{% include 'oscar/categories.html' %}
< / div >
< / div >
2014-09-22 20:42:29 +00:00
< div class = "row form-group" >
< label class = "col-sm-3 col-md-2" > {{ _('Search language') }}< / label >
< div class = "col-sm-4 col-md-4" >
< select class = "form-control" name = 'language' >
< option value = "all" { % if current_language = = ' all ' % } selected = "selected" { % endif % } > {{ _('Automatic') }}< / option >
{% for lang_id,lang_name,country_name in language_codes %}
< option value = "{{ lang_id }}" { % if lang_id = = current_language % } selected = "selected" { % endif % } > {{ lang_name }} ({{ country_name }}) - {{ lang_id }}< / option >
{% endfor %}
< / select >
< / div >
2014-09-26 18:12:46 +00:00
< span class = "col-sm-5 col-md-6 help-block" > {{ _('What language do you prefer for search?') }}< / span >
2014-09-22 20:42:29 +00:00
< / div >
< div class = "row form-group" >
< label class = "col-sm-3 col-md-2" > {{ _('Interface language') }}< / label >
< div class = "col-sm-4 col-md-4" >
< select class = "form-control" name = 'locale' >
{% for locale_id,locale_name in locales.items() %}
< option value = "{{ locale_id }}" { % if locale_id = = current_locale % } selected = "selected" { % endif % } > {{ locale_name }}< / option >
{% endfor %}
< / select >
< / div >
2014-09-26 18:12:46 +00:00
< span class = "col-sm-5 col-md-6 help-block" > {{ _('Change the language of the layout') }}< / span >
2014-09-22 20:42:29 +00:00
< / div >
< div class = "row form-group" >
< label class = "col-sm-3 col-md-2" > {{ _('Autocomplete') }}< / label >
< div class = "col-sm-4 col-md-4" >
2015-01-16 15:58:44 +00:00
2014-09-22 20:42:29 +00:00
< select class = "form-control" name = "autocomplete" >
< option value = "" > - < / option >
{% for backend in autocomplete_backends %}
< option value = "{{ backend }}" { % if backend = = autocomplete % } selected = "selected" { % endif % } > {{ backend }}< / option >
{% endfor %}
< / select >
< / div >
< span class = "col-sm-5 col-md-6 help-block" > {{ _('Find stuff as you type') }}< / span >
< / div >
2015-01-16 15:58:44 +00:00
< div class = "row form-group" >
< label class = "col-sm-3 col-md-2" > {{ _('Image proxy') }}< / label >
< div class = "col-sm-4 col-md-4" >
< select class = "form-control" name = '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 >
< / div >
< span class = "col-sm-5 col-md-6 help-block" > {{ _('Proxying image results through searx') }}< / span >
< / div >
2014-09-22 20:42:29 +00:00
< div class = "row form-group" >
< label class = "col-sm-3 col-md-2" > {{ _('Method') }}< / label >
< div class = "col-sm-4 col-md-4" >
< select class = "form-control" name = 'method' >
< option value = "POST" { % if method = = ' POST ' % } selected = "selected" { % endif % } > POST< / option >
< option value = "GET" { % if method = = ' GET ' % } selected = "selected" { % endif % } > GET< / option >
< / select >
< / div >
< span class = "col-sm-5 col-md-6 help-block" > {{ _('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 > ') }}< / span >
< / div >
< div class = "row form-group" >
< label class = "col-sm-3 col-md-2" > {{ _('Themes') }}< / label >
< div class = "col-sm-4 col-md-4" >
< select class = "form-control" name = "theme" >
{% for name in themes %}
< option value = "{{ name }}" { % if name = = theme % } selected = "selected" { % endif % } > {{ name }}< / option >
{% endfor %}
< / select >
< / div >
< span class = "col-sm-5 col-md-6 help-block" > {{ _('Change searx layout') }}< / span >
< / div >
< / div >
< / fieldset >
< / div >
2015-01-18 11:00:38 +00:00
< div class = "tab-pane active_if_nojs" id = "tab_template" >
< noscript >
< h3 > {{ _('Template features') }}< / h3 >
< / noscript >
< fieldset >
< div class = "container-fluid" >
< div class = "row form-group" >
< label class = "col-sm-3 col-md-2" > {{ _('bootstrap theme') }}< / label >
< div class = "col-sm-4 col-md-4" >
< select class = "form-control" name = 'bootstrap_theme' >
{% for b_theme in bootstrap_themes %}
< option value = "{{ b_theme }}" { % if bootstrap_theme = = b_theme % } selected = "selected" { % endif % } > {{ b_theme }}< / option >
{% endfor %}
< / select >
< / div >
< span class = "col-sm-5 col-md-6 help-block" > {{ _('Change style of this layout') }}< / span >
< / div >
< / div >
< / fieldset >
< / div >
2014-11-03 21:18:40 +00:00
< div class = "tab-pane active_if_nojs" id = "tab_engine" >
2015-01-16 15:58:44 +00:00
2014-09-26 19:43:12 +00:00
<!-- Nav tabs -->
2014-11-03 21:18:40 +00:00
< ul class = "nav nav-tabs hide_if_nojs" role = "tablist" style = "margin-bottom:20px;" >
2014-09-26 19:43:12 +00:00
{% for (categ,search_engines) in categs %}
2014-09-26 20:43:54 +00:00
< li { % if loop . first % } class = "active" { % endif % } > < a href = "#tab_engine_{{ categ|replace(' ', '_') }}" role = "tab" data-toggle = "tab" > {{ _(categ) }}< / a > < / li >
2014-09-26 19:43:12 +00:00
{% endfor %}
< / ul >
2015-01-16 15:58:44 +00:00
2014-11-03 21:18:40 +00:00
< noscript >
< h3 > {{ _('Engines') }}< / h3 >
< / noscript >
2015-01-16 15:58:44 +00:00
2014-09-26 19:43:12 +00:00
<!-- Tab panes -->
< div class = "tab-content" >
{% for (categ,search_engines) in categs %}
2014-11-03 21:18:40 +00:00
< noscript > < label > {{ _(categ) }}< / label >
< / noscript >
< div class = "tab-pane{% if loop.first %} active{% endif %} active_if_nojs" id = "tab_engine_{{ categ|replace(' ', '_') }}" >
2014-09-26 19:43:12 +00:00
< div class = "container-fluid" >
< fieldset >
{% for search_engine in search_engines %}
{% if not search_engine.private %}
< div class = "row" >
< div class = "col-xs-6 col-sm-4 col-md-4" > {{ search_engine.name }} ({{ shortcuts[search_engine.name] }})< / div >
< div class = "col-xs-6 col-sm-4 col-md-4" >
< div class = "checkbox" >
2015-01-11 18:45:17 +00:00
< input class = "hidden" type = "checkbox" id = "engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}" name = "engine_{{ search_engine.name }}" { % if search_engine . name in blocked_engines % } checked = "checked" { % endif % } / >
< label class = "btn btn-success label_hide_if_checked" for = "engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}" > {{ _('Block') }}< / label >
< label class = "btn btn-danger label_hide_if_not_checked" for = "engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}" > {{ _('Allow') }}< / label >
2014-09-26 19:43:12 +00:00
< / div >
2014-09-22 20:42:29 +00:00
< / div >
< / div >
2014-09-26 19:43:12 +00:00
{% endif %}
{% endfor %}
< / fieldset >
< / div >
2014-09-22 20:42:29 +00:00
< / div >
2014-09-26 19:43:12 +00:00
{% endfor %}
< / div >
2014-09-22 20:42:29 +00:00
< / div >
< / div >
< p class = "text-muted" style = "margin:20px 0;" > {{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
< br / >
{{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
< / p >
< input type = "submit" class = "btn btn-primary" value = "{{ _('save') }}" / >
< a href = "{{ url_for('index') }}" > < div class = "btn btn-default" > {{ _('back') }}< / div > < / a >
2015-01-16 15:58:44 +00:00
< / form >
2014-09-22 20:42:29 +00:00
< / div >
{% endblock %}