Bugzilla – Attachment 68226 Details for
Bug 19287
Add ability to mark an item 'Lost' from 'Holds to pull' list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19287: Just a bit of cleanup
Bug-19287-Just-a-bit-of-cleanup.patch (text/plain), 4.95 KB, created by
Jonathan Druart
on 2017-10-17 20:51:49 UTC
(
hide
)
Description:
Bug 19287: Just a bit of cleanup
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-10-17 20:51:49 UTC
Size:
4.95 KB
patch
obsolete
>From a2b10902b8bb673fd2a1fdbbea584dc6cf03d4d2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 12 Oct 2017 14:17:12 -0300 >Subject: [PATCH] Bug 19287: Just a bit of cleanup > >Let's add a "op" variable to know what the script is supposed to do and >make it less obscure. >--- > circ/waitingreserves.pl | 10 +++++----- > .../intranet-tmpl/prog/en/modules/circ/waitingreserves.tt | 6 ++++-- > 2 files changed, 9 insertions(+), 7 deletions(-) > >diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl >index 8527f2df9f..dfac75e5ba 100755 >--- a/circ/waitingreserves.pl >+++ b/circ/waitingreserves.pl >@@ -43,12 +43,12 @@ use Koha::Patrons; > > my $input = new CGI; > >+my $op = $input->param('op') || ''; > my $item = $input->param('itemnumber'); > my $borrowernumber = $input->param('borrowernumber'); > 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 ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( >@@ -69,7 +69,7 @@ $template->param( TransferWhenCancelAllWaitingHolds => 1 ) if $transfer_when_can > > my @cancel_result; > # if we have a return from the form we cancel the holds >-if ($item) { >+if ( $op eq 'cancel_reserve' and $item) { > my $res = cancel( $item, $borrowernumber, $fbr, $tbr ); > push @cancel_result, $res if $res; > } >@@ -138,7 +138,7 @@ foreach my $num (@getreserves) { > } > > if ($today > $calcDate) { >- if ($cancelall) { >+ if ($op eq 'cancel_all') { > my $res = cancel( $itemnumber, $borrowernum, $holdingbranch, $homebranch, !$transfer_when_cancel_all ); > push @cancel_result, $res if $res; > next; >@@ -167,9 +167,9 @@ $template->param( > # Checking if there is a Fast Cataloging Framework > $template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' ); > >-if ($item && $tab eq 'holdsover' && !@cancel_result) { >+if ($op eq 'cancel_reserve' && $tab eq 'holdsover' && !@cancel_result) { > print $input->redirect("/cgi-bin/koha/circ/waitingreserves.pl#holdsover"); >-} elsif ($cancelall) { >+} elsif ($op eq 'cancel_all') { > 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 e0f716922e..d5678a385e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >@@ -115,6 +115,7 @@ > <td>[% reserveloo.enumchron %]</td> > <td> > <form name="cancelReserve" action="waitingreserves.pl" method="post"> >+ <input type="hidden" name="op" value="cancel_reserve" /> > <input type="hidden" name="borrowernumber" value="[% reserveloo.borrowernum %]" /> > <input type="hidden" name="itemnumber" value="[% reserveloo.itemnumber %]" /> > <input type="hidden" name="fbr" value="[% reserveloo.holdingbranch %]" /> >@@ -125,7 +126,7 @@ > [% ELSE %] > <input type="submit" value="Cancel hold" /> > [% END %] >- </form> >+ </form> > </td> > </tr> > [% END %]</tbody> >@@ -138,7 +139,7 @@ > [% IF ( ReservesMaxPickUpDelay ) %]<p>Holds listed here have been awaiting pickup for more than [% ReservesMaxPickUpDelay %] days.</p>[% END %] > [% IF ( overloop ) %] > <form name="cancelAllReserve" action="waitingreserves.pl" method="post"> >- <input type="hidden" name="cancelall" value="1" /> >+ <input type="hidden" name="op" value="cancel_all" /> > <input type="hidden" name="allbranches" value="[% allbranches %]" /> > <input type="hidden" name="tab" value="holdsover"> > [% IF TransferWhenCancelAllWaitingHolds %] >@@ -182,6 +183,7 @@ > <td>[% overloo.copynumber %]</td> > <td>[% overloo.enumchron %]</td> > <td><form name="cancelReserve" action="waitingreserves.pl" method="post"> >+ <input type="hidden" name="op" value="cancel_reserve" /> > <input type="hidden" name="borrowernumber" value="[% overloo.borrowernum %]" /> > <input type="hidden" name="itemnumber" value="[% overloo.itemnumber %]" /> > <input type="hidden" name="fbr" value="[% overloo.holdingbranch %]" /> >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19287
:
68226
|
68227
|
68228
|
68229
|
68230
|
68251
|
68252
|
68253
|
68254
|
68255
|
68284
|
69746
|
70705
|
70764
|
70918
|
70919
|
73881
|
73882
|
73883
|
73884
|
73885
|
73886
|
73887
|
73888
|
73889
|
74696
|
74697
|
74698
|
74699
|
74700
|
74701
|
74702
|
74703
|
74704
|
74705
|
74749
|
75535