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 <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 44759b4be3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cdaa88d9c0)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
This commit is contained in:
Owen Leonard 2023-06-14 17:23:40 +00:00 committed by Pedro Amorim
parent 28354b300f
commit 97bc408f3e
2 changed files with 4 additions and 2 deletions

View file

@ -37,8 +37,8 @@
[% WRAPPER tabs id= "results" %]
[% WRAPPER tabs_nav %]
[% WRAPPER tab_item tabname= "recallswaiting" bt_active= 1 %] <span>Recalls waiting: [% recalls.count | html %]</span> [% END %]
[% WRAPPER tab_item tabname= "recallsover" %] <span>Recalls waiting over [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days: [% over.count | html %]</span> [% END %]
[% WRAPPER tab_item tabname= "recallswaiting" bt_active= 1 %] <span>Recalls waiting: [% recallscount | html %]</span> [% END %]
[% WRAPPER tab_item tabname= "recallsover" %] <span>Recalls waiting over [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days: [% overcount | html %]</span> [% END %]
[% END # /WRAPPER tabs_nav %]
[% WRAPPER tab_panels %]

View file

@ -64,7 +64,9 @@ if ( $op eq 'list' ) {
}
$template->param(
recalls => \@recalls,
recallscount => scalar @recalls,
over => \@over,
overcount => scalar @over,
);
}