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>
This commit is contained in:
Owen Leonard 2023-06-14 17:23:40 +00:00 committed by Martin Renvoize
parent 4e2b346b07
commit cdaa88d9c0
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
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,
);
}