mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00

The categories.html template is used in three places: 1) for the tabs on the result page 2) for the default category selection in the preferences 3) for the advanced search category selection in the oscar theme The search_on_category_select plugin only makes the checkboxes in 1) behave like tabs. The previous commit however hides the checkboxes in all three places when the plugin is loaded, which we don't want: The categories in 2) and 3) always act like checkboxes, so the checkboxes in these places should actually always be visible.
26 lines
1.2 KiB
HTML
26 lines
1.2 KiB
HTML
{% from 'simple/icons.html' import icon_big %}
|
|
{%- set category_icons = {
|
|
'general': 'search-outline',
|
|
'images': 'image-outline',
|
|
'videos': 'play-outline',
|
|
'news': 'newspaper-outline',
|
|
'map': 'location-outline',
|
|
'music': 'musical-notes-outline',
|
|
'it': 'layers-outline',
|
|
'science': 'school-outline',
|
|
'files': 'file-tray-full-outline',
|
|
'social media': 'people-outline',
|
|
} -%}
|
|
<div id="categories" class="search_categories {{categories_class}}">{{- '' -}}
|
|
<div id="categories_container">
|
|
{%- if display_tooltip %}<div class="help">{{ _('Click on the magnifier to perform search') }}</div>{% endif -%}
|
|
{%- for category in categories_as_tabs -%}
|
|
<div class="category"><input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}"{% if category in selected_categories %} checked="checked"{% endif %}/>
|
|
<label for="checkbox_{{ category|replace(' ', '_') }}" class="tooltips">
|
|
{{- icon_big(category_icons[category]) if category in category_icons else icon_big('globe-outline') -}}
|
|
<div class="category_name">{{- _(category) -}}</div>
|
|
</label>
|
|
</div>
|
|
{%- endfor -%}
|
|
</div>{{- '' -}}
|
|
</div>
|