From 95cea538decd94bf84698c1cdfe765d180b3d51d Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 20 Apr 2015 12:31:11 -0700 Subject: [PATCH] Bug 13838 - Redirect to 'expired holds' tab after cancelling a hold MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When canceling a hold from the holds over tab, you are redirected back to the holds waiting tab. Instead, we should the librarian should continue to see the list of holds past the waiting length. Test Plan: 1) Apply this patch 2) Cancel a hold from the "Holds over" tab on circ/waitingreserves.pl 3) Note you are redirected back to the holds over tab Signed-off-by: Tom Misilo Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit 353e30d73e261a96077917004036c2c01e32c623) Signed-off-by: Julian Maurice (cherry picked from commit fddc423c09f2ad1243731e94ee30e9885c9a1e44) Signed-off-by: Frédéric Demians --- circ/waitingreserves.pl | 5 ++++- .../intranet-tmpl/prog/en/modules/circ/waitingreserves.tt | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl index 547164355f..9fb799a86a 100755 --- a/circ/waitingreserves.pl +++ b/circ/waitingreserves.pl @@ -47,6 +47,7 @@ my $fbr = $input->param('fbr') || ''; my $tbr = $input->param('tbr') || ''; my $all_branches = $input->param('allbranches') || ''; my $cancelall = $input->param('cancelall'); +my $tab = $input->param('tab'); my $cancel; @@ -162,7 +163,9 @@ $template->param( ReservesMaxPickUpDelay => C4::Context->preference('ReservesMaxPickUpDelay') ); -if ($cancelall) { +if ($item && $tab eq 'holdsover') { + print $input->redirect("/cgi-bin/koha/circ/waitingreserves.pl#holdsover"); +} elsif ($cancelall) { print $input->redirect("/cgi-bin/koha/circ/waitingreserves.pl"); } else { output_html_with_http_headers $input, $cookie, $template->output; 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 1d5faf4f8b..1028033514 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt @@ -109,6 +109,7 @@ + [% IF ( reserveloo.dotransfer ) %] [% ELSE %] @@ -130,6 +131,7 @@
+
[% UNLESS TransferWhenCancelAllWaitingHolds %] @@ -167,6 +169,7 @@ + [% IF ( overloo.dotransfer ) %] [% ELSE %] -- 2.39.5