From 168f0aed4f14ad11cf713c68994b2bc6f0585fe1 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 29 Jan 2010 15:06:53 -0500 Subject: [PATCH] Fix for Bug 4080, OPAC hold screen doesn't obey OPACDisplayRequestPriority pref Signed-off-by: Galen Charlton --- .../prog/en/modules/opac-reserve.tmpl | 12 ++++++----- opac/opac-reserve.pl | 20 +++++++++---------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl index 6f33b09c74..0fff56c389 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl @@ -52,7 +52,7 @@ function changeSelection (newCopiesRowId, isSpecific) { if (copiesRowId && ((copiesRowId != newCopiesRowId) || (wasSpecific != isSpecific))) { var biblioNum = suffixOf(copiesRowId, "_"); - + // If the 'specific copy' radio button was checked if (wasSpecific && (copiesRowId != newCopiesRowId)) { // Find the selected copy @@ -79,7 +79,7 @@ return false; } $(".copiesrow:not(" + newCopiesRowId + ")").hide(); - + // Show the specific copy table for this radio button. $(newCopiesRowId).show(); }); @@ -160,7 +160,7 @@
- +
@@ -238,7 +238,9 @@ Item Type + Priority + Hold Starts on Date @@ -297,7 +299,7 @@ - out of + out of " id="reserve_date_" size="10"> @@ -465,7 +467,7 @@ Not for loan () - WaitingOn hold for patron + WaitingOn hold for patron atexpected at since . diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index be3c77ae1e..675b90109a 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -45,7 +45,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( debug => 1, } ); - +my $OPACDisplayRequestPriority = (C4::Context->preference("OPACDisplayRequestPriority")) ? 1 : 0; sub get_out ($$$) { output_html_with_http_headers(shift,shift,shift); # $query, $cookie, $template->output; exit; @@ -167,7 +167,7 @@ if ( $query->param('place_reserve') ) { my $branch = $query->param('branch'); $selectedItems = "$bib/$item/$branch/"; } - + my @selectedItems = split /\//, $selectedItems; # Make sure there is a biblionum/itemnum/branch triplet for each item. @@ -190,7 +190,7 @@ if ( $query->param('place_reserve') ) { my $biblioData = $biblioDataHash{$biblioNum}; my $found; - + # Check for user supplied reserve date my $startdate; if ( @@ -216,7 +216,7 @@ if ( $query->param('place_reserve') ) { # Inserts a null into the 'itemnumber' field of 'reserves' table. $itemNum = undef; } - + # Here we actually do the reserveration. Stage 3. AddReserve($branch, $borrowernumber, $biblioNum, 'a', [$biblioNum], $rank, $startdate, $notes, $biblioData->{'title'}, $itemNum, $found) if ($canreserve); @@ -333,12 +333,12 @@ foreach my $biblioNum (@biblionumbers) { my $fee = GetReserveFee(undef, $borrowernumber, $itemInfo->{'biblionumber'}, 'a', ( $itemInfo->{'biblioitemnumber'} ) ); $itemInfo->{'reservefee'} = sprintf "%.02f", ($fee ? $fee : 0.0); - + if ($itemLevelTypes && $itemInfo->{itype}) { $itemInfo->{description} = $itemTypes->{$itemInfo->{itype}}{description}; $itemInfo->{imageurl} = getitemtypeimagesrc() . "/". $itemTypes->{$itemInfo->{itype}}{imageurl}; } - + if (!$itemInfo->{'notforloan'} && !($itemInfo->{'itemnotforloan'} > 0)) { $biblioLoopIter{forloan} = 1; } @@ -449,13 +449,13 @@ foreach my $biblioNum (@biblionumbers) { $itemLoopIter->{waitingdate} = format_date($wait_hashref->{waitingdate}); } $itemLoopIter->{imageurl} = getitemtypeimagelocation( 'opac', $itemTypes->{ $itemInfo->{itype} }{imageurl} ); - + # Show serial enumeration when needed if ($itemLoopIter->{enumchron}) { - $itemdata_enumchron = 1; + $itemdata_enumchron = 1; } $template->param( itemdata_enumchron => $itemdata_enumchron ); - + push @{$biblioLoopIter{itemLoop}}, $itemLoopIter; } @@ -489,7 +489,7 @@ $template->param(itemtable_colspan => $itemTableColspan); # display infos $template->param(bibitemloop => $biblioLoop); - +$template->param( showpriority=>1 ) if $OPACDisplayRequestPriority; # can set reserve date in future if ( C4::Context->preference( 'AllowHoldDateInFuture' ) && -- 2.39.5