mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[refactor] make templates/oscar/categories.html dry
This commit is contained in:
parent
ced656606f
commit
2c7dc9d358
1 changed files with 1 additions and 8 deletions
|
@ -1,13 +1,6 @@
|
|||
<div id="categories">
|
||||
{%- if rtl -%}
|
||||
{% for category in categories_as_tabs | reverse -%}
|
||||
{% for category in ((categories_as_tabs | reverse) if rtl else categories_as_tabs) -%}
|
||||
<input class="hidden" type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} />{{- '' -}}
|
||||
<label for="checkbox_{{ category|replace(' ', '_') }}">{{ _(category) }}</label>
|
||||
{%- endfor %}
|
||||
{%- else -%}
|
||||
{% for category in categories_as_tabs -%}
|
||||
<input class="hidden" type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} />{{- '' -}}
|
||||
<label for="checkbox_{{ category|replace(' ', '_') }}">{{ _(category) }}</label>
|
||||
{%- endfor %}
|
||||
{%- endif -%}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue