diff options
Diffstat (limited to 'searx/templates/simple/categories.html')
-rw-r--r-- | searx/templates/simple/categories.html | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/searx/templates/simple/categories.html b/searx/templates/simple/categories.html index 29616f127..6ba550015 100644 --- a/searx/templates/simple/categories.html +++ b/searx/templates/simple/categories.html @@ -13,14 +13,25 @@ } -%} <div id="categories" class="search_categories">{{- '' -}} <div id="categories_container"> - {%- for category in categories -%} - <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 -%} - {%- if display_tooltip %}<div class="help">{{ _('Click on the magnifier to perform search') }}</div>{% endif -%} + {%- if not search_on_category_select or not display_tooltip -%} + {%- for category in categories_as_tabs -%} + <div class="category category_checkbox">{{- '' -}} + <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 -%} + {%- if display_tooltip %}<div class="help">{{ _('Click on the magnifier to perform search') }}</div>{% endif -%} + {%- else -%} + {%- for category in categories_as_tabs -%}{{- '\n' -}} + <button type="submit" name="category_{{ category|replace(' ', '_') }}" class="category category_button {% if category in selected_categories %}selected{% endif %}"> + {{- icon_big(category_icons[category]) if category in category_icons else icon_big('globe-outline') -}} + <div class="category_name">{{- _(category) -}}</div>{{- '' -}} + </button>{{- '' -}} + {%- endfor -%} + {{- '\n' -}} + {%- endif -%} </div>{{- '' -}} </div> |