From b7ad6f023a6353d0842efd332f7c5d1e433f9784 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 6 Apr 2009 08:50:51 -0500 Subject: [PATCH] Partial fix for Bug 2655, "Items waiting on the hold shelf display as 'Available' in OPAC" GetItemsInfo() returns a count_reserves variable which may be "Waiting" or "Reserved," but opac-detail.pl didn't include a check for these possibilities. This patch has opac-detail.tmpl output "On hold" in either case. Signed-off-by: Galen Charlton Signed-off-by: Henri-Damien LAURENT --- koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl | 2 +- opac/opac-detail.pl | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl index 892008223f..bee0ec779b 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl @@ -289,7 +289,7 @@ In transit from to since - Available + On holdOn holdAvailable diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 43e8531160..f132d3daad 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -148,6 +148,10 @@ for my $itm (@items) { $itm->{'lostimagelabel'} = $lostimageinfo->{ 'label' }; } + if( $itm->{'count_reserves'}){ + if( $itm->{'count_reserves'} eq "Waiting"){ $itm->{'waiting'} = 1; } + if( $itm->{'count_reserves'} eq "Reserved"){ $itm->{'onhold'} = 1; } + } my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers($itm->{itemnumber}); if ( $transfertwhen ne '' ) { -- 2.20.1