From bd41df01a05abd4a732ad5e80c2874cc35e1704b 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 Signed-off-by: Owen Leonard Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer (cherry picked from commit 88a292af36a142117b4b81b005e134992e272df7) Signed-off-by: Baptiste Wojtkowski --- 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 d30a47a75a..8bfff8cc20 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -59,7 +59,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 %] @@ -76,7 +76,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 %]