Bugzilla – Attachment 3313 Details for
Bug 5875
waitingreserves highlighting now depends on maxpickupdate
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed Patch
0001-Bug-5875-waitingreserves-highlighting-now-depends-on.patch (text/plain), 7.01 KB, created by
Chris Cormack
on 2011-03-16 02:01:36 UTC
(
hide
)
Description:
Proposed Patch
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2011-03-16 02:01:36 UTC
Size:
7.01 KB
patch
obsolete
>From d00e8be6c34f34fe9366829de09f5125b81a948e Mon Sep 17 00:00:00 2001 >From: Paul Poulain <paul.poulain@biblibre.com> >Date: Wed, 15 Dec 2010 13:33:51 +0100 >Subject: [PATCH] Bug 5875 : waitingreserves highlighting now depends on maxpickupdate > >--- > circ/waitingreserves.pl | 32 ++++++++------- > .../prog/en/includes/reserves_waiting.inc | 44 ++++++++++++++++++++ > 2 files changed, 61 insertions(+), 15 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/reserves_waiting.inc > >diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl >index 0183f19..c1843db 100755 >--- a/circ/waitingreserves.pl >+++ b/circ/waitingreserves.pl >@@ -26,6 +26,7 @@ use C4::Branch; # GetBranchName > use C4::Auth; > use C4::Dates qw/format_date/; > use C4::Circulation; >+use C4::Reserves; # qw/GetMaxPickUpDelay/; > use C4::Members; > use C4::Biblio; > use C4::Items; >@@ -112,14 +113,23 @@ foreach my $num (@getreserves) { > $gettitle->{'itemtype'} = C4::Context->preference('item-level_itypes') ? $gettitle->{'itype'} : $gettitle->{'itemtype'}; > my $getborrower = GetMemberDetails( $num->{'borrowernumber'} ); > my $itemtypeinfo = getitemtypeinfo( $gettitle->{'itemtype'} ); # using the fixed up itype/itemtype >- $getreserv{'waitingdate'} = format_date( $num->{'waitingdate'} ); >+ if ($num->{waitingdate}){ >+ my @maxpickupdate=GetMaxPickupDate($num->{'waitingdate'},$borrowernumber, $num); >+ $getreserv{'waitingdate'} = format_date( $num->{'waitingdate'} ); > >- my ( $waiting_year, $waiting_month, $waiting_day ) = split (/-/, $num->{'waitingdate'}); >- ( $waiting_year, $waiting_month, $waiting_day ) = >- Add_Delta_Days( $waiting_year, $waiting_month, $waiting_day, >- C4::Context->preference('ReservesMaxPickUpDelay')); >- my $calcDate = Date_to_Days( $waiting_year, $waiting_month, $waiting_day ); >+ $getreserv{'maxpickupdate'} = sprintf("%d-%02d-%02d", @maxpickupdate); > >+ my $calcDate = Date_to_Days( @maxpickupdate ); >+ >+ if ( $today > $calcDate ) { >+ $getreserv{'messcompa'} = 1; >+ push @overloop, \%getreserv; >+ $overcount++; >+ } else { >+ push @reservloop, \%getreserv; >+ $reservcount++; >+ } >+ } > $getreserv{'itemtype'} = $itemtypeinfo->{'description'}; > $getreserv{'title'} = $gettitle->{'title'}; > $getreserv{'itemnumber'} = $gettitle->{'itemnumber'}; >@@ -128,6 +138,7 @@ foreach my $num (@getreserves) { > $getreserv{'homebranch'} = GetBranchName($gettitle->{'homebranch'}); > $getreserv{'holdingbranch'} = $gettitle->{'holdingbranch'}; > $getreserv{'itemcallnumber'} = $gettitle->{'itemcallnumber'}; >+ > if ( $gettitle->{'homebranch'} ne $gettitle->{'holdingbranch'} ) { > $getreserv{'dotransfer'} = 1; > } >@@ -138,15 +149,6 @@ foreach my $num (@getreserves) { > if ( $getborrower->{'emailaddress'} ) { > $getreserv{'borrowermail'} = $getborrower->{'emailaddress'}; > } >- >- if ($today > $calcDate) { >- push @overloop, \%getreserv; >- $overcount++; >- }else{ >- push @reservloop, \%getreserv; >- $reservcount++; >- } >- > } > > $template->param( >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/reserves_waiting.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/reserves_waiting.inc >new file mode 100644 >index 0000000..f3cf244 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/reserves_waiting.inc >@@ -0,0 +1,44 @@ >+<!-- TMPL_IF NAME="reserves_waiting" --> >+<!-- TMPL_LOOP NAME="reserves_waiting" --> >+ <div class="dialog message" id="reserve<!-- TMPL_VAR NAME="biblionumber" -->"> >+ <h3>Hold Found: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR Name="title" escape="html" --></a></h3> >+ <!-- TMPL_IF NAME="reservenotes" --><h4>Notes: <!-- TMPL_VAR Name="reservenotes" --></h4><!-- /TMPL_IF --> >+ <h5>Hold for:</h5> >+ <ul> >+ <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->"> >+ <!-- TMPL_VAR Name="borsurname" -->, <!-- TMPL_VAR Name="borfirstname" --> >+ </a> (<!-- TMPL_VAR Name="borcnum" -->)</li> >+ <li><!-- TMPL_VAR Name="boraddress" --><br /> >+ <!-- TMPL_IF NAME="boraddress2" --><!-- TMPL_VAR NAME="boraddress2" --><br /><!-- /TMPL_IF --> >+ <!-- TMPL_VAR Name="borcity" --> <!-- TMPL_VAR NAME="borzip" --></li> >+ <!-- TMPL_IF NAME="borphone" --><li><!-- TMPL_VAR Name="borphone" --></li><!-- /TMPL_IF --> >+ <!-- TMPL_IF NAME="boremail" --><li><!-- TMPL_IF name="transfertodo" --><!-- TMPL_VAR NAME="boremail" --><!-- TMPL_ELSE --><a id="boremail" href="mailto:<!-- TMPL_VAR NAME="boremail" -->"><!-- TMPL_VAR NAME="boremail" --></a><!-- /TMPL_IF --></li><!-- /TMPL_IF --> >+<!-- TMPL_IF NAME="debarred" --><li class="error">Patron is RESTRICTED</li><!-- /TMPL_IF --> >+<!-- TMPL_IF NAME="gonenoaddress" --><li class="error">Patron's address is in doubt</li><!-- /TMPL_IF --> >+ </ul> >+ <!-- TMPL_IF name="transfertodo" --> >+ <h4><strong>Transfer to:</strong> <!-- TMPL_VAR Name="destbranchname" --></h4> >+ <!-- TMPL_ELSE --> >+ <h4><strong>Hold at</strong> <!-- TMPL_VAR Name="destbranchname" --></h4> >+ <!-- /TMPL_IF --> >+ <form method="post" action="<!-- TMPL_VAR NAME="script_name" -->" class="confirm"> >+ <!-- TMPL_IF name="transfertodo" --> >+ <input type="submit" class="approve" value="Confirm hold and Transfer" /> >+ <input type="submit" value="Print slip, Transfer, and Confirm" class="print" onclick="Dopop('../circ/hold-transfer-slip.pl?transfer=1&borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&op=slip'); $('#reserve<!-- TMPL_VAR NAME="biblionumber" -->').hide(); return false;" /> >+ <!-- TMPL_ELSE --> >+ <input type="submit" class="approve" value="Confirm hold" /> >+ <input type="submit" value="Print Slip and Confirm" class="print" onclick="Dopop('../circ/hold-transfer-slip.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&op=slip'); $('#reserve<!-- TMPL_VAR NAME="biblionumber" -->').hide(); return false;" /> >+ <!-- /TMPL_IF --> >+ <input type="hidden" name="itemnumber" value="<!-- TMPL_VAR Name="itemnumber" -->" /> >+ <input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR Name="circborrowernumber" -->" /> >+ <input type="hidden" name="resbarcode" value="<!-- TMPL_VAR Name="barcode" -->" /> >+ <input type="hidden" name="reservenumber" value="<!-- TMPL_VAR Name="reservenumber" -->" /> >+ <input type="hidden" name="diffBranch" value="<!-- TMPL_VAR Name="destbranch" -->" /> >+ <input type="hidden" name="exemptfine" value="<!-- TMPL_VAR Name="exemptfine" -->" /> >+ <input type="hidden" name="dropboxmode" value="<!-- TMPL_VAR Name="dropboxmode" -->" /> >+ </form> >+ </div> >+<!--/TMPL_LOOP --> >+<!-- /TMPL_IF --> >+ >+ >-- >1.7.1 >
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 5875
: 3313