oscar template: using tab to seperate engines in preferences

This commit is contained in:
Thomas Pointhuber 2014-09-26 21:43:12 +02:00
parent afcfa04e30
commit 5568fbd89d

View file

@ -87,27 +87,40 @@
</fieldset> </fieldset>
</div> </div>
<div class="tab-pane" id="tab_engine"> <div class="tab-pane" id="tab_engine">
<fieldset>
{% for (categ,search_engines) in categs %} <!-- Nav tabs -->
<legend>{{ _(categ) }}</legend> <ul class="nav nav-tabs" role="tablist" style="margin-bottom:20px;">
<div class="container-fluid"> {% for (categ,search_engines) in categs %}
{% for search_engine in search_engines %} <li{% if loop.first %} class="active"{% endif %}><a href="#tab_engine_{{ categ|replace(' ', '') }}" role="tab" data-toggle="tab">{{ _(categ) }}</a></li>
{% if not search_engine.private %} {% endfor %}
<div class="row"> </ul>
<div class="col-sm-4 col-md-4">{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})</div>
<div class="col-sm-4 col-md-4">
<div class="checkbox"> <!-- Tab panes -->
<input class="hidden" type="checkbox" id="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}" name="engine_{{ search_engine.name }}"{% if search_engine.name in blocked_engines %} checked="checked"{% endif %} /> <div class="tab-content">
<label class="btn btn-success label_hide_if_checked" for="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Block') }}</label> {% for (categ,search_engines) in categs %}
<label class="btn btn-danger label_hide_if_not_checked" for="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Allow') }}</label> <div class="tab-pane{% if loop.first %} active{% endif %}" id="tab_engine_{{ categ|replace(' ', '') }}">
<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">
<input class="hidden" type="checkbox" id="engine_{{ categ }}_{{ 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 }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Block') }}</label>
<label class="btn btn-danger label_hide_if_not_checked" for="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Allow') }}</label>
</div>
</div> </div>
</div> </div>
</div> {% endif %}
{% endif %} {% endfor %}
{% endfor %} </fieldset>
</div>
</div> </div>
{% endfor %} {% endfor %}
</fieldset> </div>
</div> </div>
</div> </div>