From 1e4d55c7b718b15ba1d6c4a4febecbc88356708f Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 18 May 2022 17:38:37 -0300 Subject: [PATCH] Bug 22456: Staff interface handling WIP --- circ/waitingreserves.pl | 6 ++++++ .../prog/en/modules/circ/waitingreserves.tt | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl index 608fb49d3f..195ff30422 100755 --- a/circ/waitingreserves.pl +++ b/circ/waitingreserves.pl @@ -28,6 +28,7 @@ use Date::Calc qw( Date_to_Days Today ); use C4::Reserves qw( ModReserve ModReserveCancelAll ); use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::BiblioFrameworks; +use Koha::Hold::CancellationRequests; use Koha::Items; use Koha::ItemTypes; use Koha::Patrons; @@ -116,6 +117,10 @@ while ( my $hold = $holds->next ) { } +my $holds_with_cancellation_requests = + Koha::Hold::CancellationRequests->filter_by_current->search( {}, + { distinct => 'hold_id' } )->get_column('hold_id'); + $template->param(cancel_result => \@cancel_result) if @cancel_result; $template->param( @@ -123,6 +128,7 @@ $template->param( reservecount => scalar @reserve_loop, overloop => \@over_loop, overcount => scalar @over_loop, + cancel_reqs => $holds_with_cancellation_requests, show_date => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }), tab => $tab, ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt index b6e06f7bc9..c1824f0570 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt @@ -88,6 +88,11 @@ Holds waiting over [% Koha.Preference('ReservesMaxPickUpDelay') | html %] days: [% overcount | html %] +
  • + + Holds with cancellation requests: [% cancel_reqs | html %] + +
  • @@ -125,6 +130,13 @@
    No holds found.
    [% END %]
    +
    + [% IF cancel_reqs %] +
    Table goes here.
    + [% ELSE %] +
    No holds found.
    + [% END %] +
    [% END %] -- 2.34.1