# HG changeset patch # User Thierry Florac # Date 1611758984 -3600 # Node ID 7040403e9c9545b2b25422f00e4fb06f93490bd3 # Parent 6d6b3d90e1a7abcad66e3e9568cca72ac6e4d12f Added themes support on site root to handle advanced search on themes diff -r 6d6b3d90e1a7 -r 7040403e9c95 src/pyams_content_es/root/zmi/search.py --- a/src/pyams_content_es/root/zmi/search.py Tue Jan 12 13:38:54 2021 +0100 +++ b/src/pyams_content_es/root/zmi/search.py Wed Jan 27 15:49:44 2021 +0100 @@ -125,6 +125,9 @@ if data.get('tags'): tags = [intids.register(term) for term in data['tags']] params &= Q('terms', tags=tags) + if data.get('themes'): + themes = [intids.register(term) for term in data['themes']] + params &= Q('terms', **{'themes.terms': themes}) if data.get('collections'): collections = [intids.register(collection) for collection in data['collections']] params &= Q('terms', collections=collections) diff -r 6d6b3d90e1a7 -r 7040403e9c95 src/pyams_content_es/root/zmi/templates/advanced-search.pt --- a/src/pyams_content_es/root/zmi/templates/advanced-search.pt Tue Jan 12 13:38:54 2021 +0100 +++ b/src/pyams_content_es/root/zmi/templates/advanced-search.pt Wed Jan 27 15:49:44 2021 +0100 @@ -184,20 +184,16 @@ -
- Tags -
- -
-
-
- Collections -
- -
-
+ +
+ + ${widget.label} +
+ +
+
+
+