2021-11-13 09:42:07 +00:00
|
|
|
{% from 'simple/icons.html' import icon_big %}
|
|
|
|
{%- set category_icons = {
|
2025-02-04 14:59:02 +00:00
|
|
|
'apps': 'appstore',
|
|
|
|
'dictionaries': 'book',
|
|
|
|
'files': 'file-tray-full',
|
|
|
|
'general': 'search',
|
|
|
|
'images': 'image',
|
|
|
|
'it': 'layers',
|
|
|
|
'map': 'location',
|
|
|
|
'music': 'musical-notes',
|
|
|
|
'news': 'newspaper',
|
|
|
|
'radio': 'radio',
|
|
|
|
'science': 'school',
|
|
|
|
'social media': 'people',
|
|
|
|
'TV': 'tv',
|
|
|
|
'videos': 'play',
|
2021-11-13 14:08:54 +00:00
|
|
|
} -%}
|
2021-10-26 21:11:51 +00:00
|
|
|
<div id="categories" class="search_categories">{{- '' -}}
|
2017-02-12 14:06:01 +00:00
|
|
|
<div id="categories_container">
|
2023-09-09 14:49:14 +00:00
|
|
|
{%- if not search_on_category_select or not display_tooltip -%}
|
2024-08-22 23:29:44 +00:00
|
|
|
{%- for category in categories -%}
|
2023-09-09 14:49:14 +00:00
|
|
|
<div class="category category_checkbox">{{- '' -}}
|
2024-09-11 01:44:30 +00:00
|
|
|
<input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}"{% if category in selected_categories %} checked="checked"{% endif %}>
|
2023-09-09 14:49:14 +00:00
|
|
|
<label for="checkbox_{{ category|replace(' ', '_') }}" class="tooltips">
|
2025-02-04 14:59:02 +00:00
|
|
|
{{- icon_big(category_icons[category]) if category in category_icons else icon_big('globe') -}}
|
2023-09-09 14:49:14 +00:00
|
|
|
<div class="category_name">{{- _(category) -}}</div>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
{%- endfor -%}
|
|
|
|
{%- if display_tooltip %}<div class="help">{{ _('Click on the magnifier to perform search') }}</div>{% endif -%}
|
|
|
|
{%- else -%}
|
2024-08-22 23:29:44 +00:00
|
|
|
{%- for category in categories -%}{{- '\n' -}}
|
2023-09-27 15:46:27 +00:00
|
|
|
<button type="submit" name="category_{{ category }}" class="category category_button {% if category in selected_categories %}selected{% endif %}">
|
2025-02-04 14:59:02 +00:00
|
|
|
{{- icon_big(category_icons[category]) if category in category_icons else icon_big('globe') -}}
|
2023-09-09 14:49:14 +00:00
|
|
|
<div class="category_name">{{- _(category) -}}</div>{{- '' -}}
|
|
|
|
</button>{{- '' -}}
|
|
|
|
{%- endfor -%}
|
2024-11-26 14:01:21 +00:00
|
|
|
<input name="categories" id="selected-categories" type="hidden" />
|
2023-09-09 14:49:14 +00:00
|
|
|
{{- '\n' -}}
|
|
|
|
{%- endif -%}
|
2017-02-12 14:06:01 +00:00
|
|
|
</div>{{- '' -}}
|
|
|
|
</div>
|