From 7d17d37ac718e47406ab7af61a2dceb6635b77f9 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sat, 23 Jul 2022 18:26:43 +0200 Subject: [PATCH] [fix] don't show a category if there is no active engine in When deactivate all the engines of a category, this category should disappeare. This feature has been lost in commit 8e9ad1cc. For better readability, webapp.get_enabled_categories() has been rewritten with identical functionality. Related: - https://github.com/searxng/searxng/issues/1020 - https://github.com/searxng/searxng/issues/1604 Signed-off-by: Markus Heiser --- searx/templates/simple/categories.html | 2 +- searx/webapp.py | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/searx/templates/simple/categories.html b/searx/templates/simple/categories.html index cee9f1e35..29616f127 100644 --- a/searx/templates/simple/categories.html +++ b/searx/templates/simple/categories.html @@ -13,7 +13,7 @@ } -%}
{{- '' -}}
- {%- for category in categories_as_tabs -%} + {%- for category in categories -%}