From: Owen Leonard Date: Mon, 6 Apr 2009 13:50:51 +0000 (-0500) Subject: Partial fix for Bug 2655, "Items waiting on the hold shelf display as 'Available... X-Git-Tag: new_acq_a_porter~342 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;ds=sidebyside;h=60761e44aefca3bb96d2b43e5e8c70a9f3ad1516;p=koha_gimpoz 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 --- 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 8f2a339b62..94208bde9c 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl @@ -313,7 +313,7 @@ In transit from to since - Available + On holdOn holdAvailable diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 3dc274297a..992e23690a 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -154,6 +154,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 '' ) {