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