mirror of
https://github.com/searxng/searxng.git
synced 2025-09-10 12:18:24 +02:00
[enh] autocompleter server side part
This commit is contained in:
parent
20504a0e83
commit
41dd4d9ba3
5 changed files with 69 additions and 28 deletions
|
@ -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 %}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue