diff options
| author | Adam Tauber <asciimoo@gmail.com> | 2014-03-29 16:29:19 +0100 |
|---|---|---|
| committer | Adam Tauber <asciimoo@gmail.com> | 2014-03-29 16:29:19 +0100 |
| commit | 41dd4d9ba3429b387bf32a65ce4b1bfe4f82444c (patch) | |
| tree | abc9004c7ea50ac1017b4dd20621552955bd2124 /searx/templates | |
| parent | 20504a0e834a99fb1274ad907c0b62fb90eb96d3 (diff) | |
[enh] autocompleter server side part
Diffstat (limited to 'searx/templates')
| -rw-r--r-- | searx/templates/base.html | 4 | ||||
| -rw-r--r-- | searx/templates/preferences.html | 15 |
2 files changed, 15 insertions, 4 deletions
diff --git a/searx/templates/base.html b/searx/templates/base.html index d86982a59..da5ae905f 100644 --- a/searx/templates/base.html +++ b/searx/templates/base.html @@ -15,14 +15,14 @@ {% endblock %} <script type="text/javascript"> searx = {}; - searx.autocompleter = {% if client.autocompleter %}true{% else %}false{% endif %}; + searx.autocompleter = {% if autocomplete %}true{% else %}false{% endif %}; </script> </head> <body> <div id="container"> {% block content %} {% endblock %} -{% if client.autocompleter %} +{% if autocomplete %} <script src="{{ url_for('static', filename='js/mootools-core-1.4.5-min.js') }}" ></script> <script src="{{ url_for('static', filename='js/mootools-autocompleter-1.1.2-min.js') }}" ></script> {% endif %} diff --git a/searx/templates/preferences.html b/searx/templates/preferences.html index c1b9a8968..582305a1b 100644 --- a/searx/templates/preferences.html +++ b/searx/templates/preferences.html @@ -17,7 +17,7 @@ <select 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> + <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>{{ lang_name }} ({{ country_name }}) - {{ lang_id }}</option> {% endfor %} </select> </p> @@ -27,7 +27,18 @@ <p> <select 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> + <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option> + {% endfor %} + </select> + </p> + </fieldset> + <fieldset> + <legend>{{ _('Autocomplete') }}</legend> + <p> + <select name="autocomplete"> + <option value=""> - </option> + {% for backend in autocomplete_backends %} + <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option> {% endfor %} </select> </p> |