From cdaa88d9c096e9fa20d3dc0919e9fb2a9f9a1554 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 14 Jun 2023 17:23:40 +0000 Subject: [PATCH] Bug 34013: Recalls awaiting pickup doesn't show count on each tab This patch modifies recalls_waiting.pl so that it defines template variables for 'recalls waiting' and 'recalls waiting over x days' counts in the same way that waitingreserves.pl handles it. To test you must have UseRecalls enabled, and some recalls data that will allow you to see content under each tab. Go to Circulation -> Recalls awaiting pickup and confirm that both tabs show the correct count. Signed-off-by: Sam Lau Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 44759b4be3aa4c3088edca77837d5d278de5cb1e) Signed-off-by: Martin Renvoize --- .../intranet-tmpl/prog/en/modules/recalls/recalls_waiting.tt | 4 ++-- recalls/recalls_waiting.pl | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_waiting.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_waiting.tt index 508f9005c1..105ea93e0e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_waiting.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_waiting.tt @@ -37,8 +37,8 @@ [% WRAPPER tabs id= "results" %] [% WRAPPER tabs_nav %] - [% WRAPPER tab_item tabname= "recallswaiting" bt_active= 1 %] Recalls waiting: [% recalls.count | html %] [% END %] - [% WRAPPER tab_item tabname= "recallsover" %] Recalls waiting over [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days: [% over.count | html %] [% END %] + [% WRAPPER tab_item tabname= "recallswaiting" bt_active= 1 %] Recalls waiting: [% recallscount | html %] [% END %] + [% WRAPPER tab_item tabname= "recallsover" %] Recalls waiting over [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days: [% overcount | html %] [% END %] [% END # /WRAPPER tabs_nav %] [% WRAPPER tab_panels %] diff --git a/recalls/recalls_waiting.pl b/recalls/recalls_waiting.pl index 4ded9584e8..a485e3a8c2 100755 --- a/recalls/recalls_waiting.pl +++ b/recalls/recalls_waiting.pl @@ -64,7 +64,9 @@ if ( $op eq 'list' ) { } $template->param( recalls => \@recalls, + recallscount => scalar @recalls, over => \@over, + overcount => scalar @over, ); } -- 2.20.1