forked from zaclys/searxng
[fix] ordered categories in preferences - closes #258
This commit is contained in:
parent
79b3de5185
commit
6f73f4e7a4
@ -101,8 +101,8 @@
|
||||
<th>{{ _('Category') }}</th>
|
||||
<th>{{ _('Allow') }} / {{ _('Block') }}</th>
|
||||
</tr>
|
||||
{% for (categ,search_engines) in categs %}
|
||||
{% for search_engine in search_engines %}
|
||||
{% for categ in categories %}
|
||||
{% for search_engine in engines_by_category[categ] %}
|
||||
|
||||
{% if not search_engine.private %}
|
||||
<tr>
|
||||
|
@ -89,8 +89,8 @@
|
||||
<th>{{ _('Category') }}</th>
|
||||
<th>{{ _('Allow') }} / {{ _('Block') }}</th>
|
||||
</tr>
|
||||
{% for (categ,search_engines) in categs %}
|
||||
{% for search_engine in search_engines %}
|
||||
{% for categ in categories %}
|
||||
{% for search_engine in engines_by_category[categ] %}
|
||||
|
||||
{% if not search_engine.private %}
|
||||
<tr>
|
||||
|
@ -116,7 +116,7 @@
|
||||
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs nav-justified hide_if_nojs" role="tablist" style="margin-bottom:20px;">
|
||||
{% for (categ,search_engines) in categs %}
|
||||
{% for categ in categories %}
|
||||
<li{% if loop.first %} class="active"{% endif %}><a href="#tab_engine_{{ categ|replace(' ', '_') }}" role="tab" data-toggle="tab">{{ _(categ) }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@ -127,13 +127,13 @@
|
||||
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content">
|
||||
{% for (categ,search_engines) in categs %}
|
||||
{% for categ in categories %}
|
||||
<noscript><label>{{ _(categ) }}</label>
|
||||
</noscript>
|
||||
<div class="tab-pane{% if loop.first %} active{% endif %} active_if_nojs" id="tab_engine_{{ categ|replace(' ', '_') }}">
|
||||
<div class="container-fluid">
|
||||
<fieldset>
|
||||
{% for search_engine in search_engines %}
|
||||
{% for search_engine in engines_by_category[categ] %}
|
||||
{% if not search_engine.private %}
|
||||
<div class="row">
|
||||
{% if not rtl %}
|
||||
|
@ -607,7 +607,7 @@ def preferences():
|
||||
current_language=lang or 'all',
|
||||
image_proxy=image_proxy,
|
||||
language_codes=language_codes,
|
||||
categs=categories.items(),
|
||||
engines_by_category=categories,
|
||||
blocked_engines=blocked_engines,
|
||||
autocomplete_backends=autocomplete_backends,
|
||||
shortcuts={y: x for x, y in engine_shortcuts.items()},
|
||||
|
Loading…
Reference in New Issue
Block a user