From 499ae7077dda65db317c7b575c49b104928e8915 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 13 Nov 2022 14:06:42 +0000 Subject: [PATCH] Bug 20207: Don't show search options when no suggestions show When you are not logged in and OPACViewOthersSuggestions is deactivated, you don't see any suggestions. When we see no suggestions, we should also not show the option to serach in suggestions. To test: * as a logged in user and logged out, try various combinations of: * OPACViewOthersSuggestions * AnonSuggestions * Verify display matches expectations (new button, shown suggestions, search input) Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt index e62f951682..76bcf0b4e0 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt @@ -311,7 +311,7 @@ [% IF ( deleted ) %]
The selected suggestions have been deleted.
[% END %] - [% IF suggestions.size > 0 OR title_filter %] + [% IF (Koha.Preference( 'OPACViewOthersSuggestions' ) || loggedinusername) && (suggestions.size > 0 OR title_filter) %] [% SET can_delete_suggestion = 0 %]
@@ -321,7 +321,7 @@
- [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %] + [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) %] [% IF loggedinusername %]
-- 2.39.5