From d7ff63b3895a05e09dbd9124ecae1071dd408969 Mon Sep 17 00:00:00 2001 From: Baptiste Wojtkowski Date: Thu, 13 Feb 2025 12:15:42 +0100 Subject: [PATCH] Bug 39124: In lists dropdown, the option "view all" is always displayed In the code of the OPAC, the "Lists" dropdown menu is supposed to display max. 10 lists and display a button "view all" if there are more than 10 lists. The button "view all" is always displayed and it is weird when there are few lists because "Public lists" and "Your lists" do the same. Test plan: 1 - On an OPAC with less than 10 public lists and 10 private lists, navigate to /cgi-bin/koha/opac-shelves.pl, click on the dropdown see there is a view all button for both types of lists 2 - APPLY PATCH 3 - Repeat 1, notice the buttons disappeared 4 - Create lists so there are >10 public and >10 private lists 5 - Repeat 1, notice the buttons reappeared --- koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc index e624134b..c35a949d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -73,7 +73,7 @@ [% SET number_of_public_shelves = number_of_public_shelves + 1 %] [% IF number_of_public_shelves >= 10 %][% LAST %][% END %] [% END %] - [% IF some_public_shelves > 10 %] + [% IF some_public_shelves.count > 10 %] View all [% END %] [% END %] @@ -92,7 +92,7 @@ [% SET number_of_private_shelves = number_of_private_shelves + 1 %] [% IF number_of_private_shelves >= 10 %][% LAST %][% END %] [% END %] - [% IF some_private_shelves > 10 %] + [% IF some_private_shelves.count > 10 %] View all [% END %] [% ELSE %] -- 2.30.2