Partial fix for Bug 2655, "Items waiting on the hold shelf display as 'Available...
authorOwen Leonard <oleonard@myacpl.org>
Mon, 6 Apr 2009 13:50:51 +0000 (08:50 -0500)
committerGalen Charlton <galen.charlton@liblime.com>
Wed, 8 Apr 2009 18:01:21 +0000 (13:01 -0500)
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 <galen.charlton@liblime.com>
koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
opac/opac-detail.pl

index 8f2a339..94208bd 100644 (file)
                                     In transit from <!-- TMPL_VAR NAME="transfertfrom" -->
                                     to <!-- TMPL_VAR NAME="transfertto" --> since <!-- TMPL_VAR NAME="transfertwhen" -->
                                 <!-- TMPL_ELSE -->
-                                    Available
+                                    <!-- TMPL_IF NAME="waiting" -->On hold<!-- TMPL_ELSE --><!-- TMPL_IF NAME="onhold" -->On hold<!-- TMPL_ELSE -->Available<!-- /TMPL_IF --><!-- /TMPL_IF -->
                                 <!-- /TMPL_IF -->
                             <!-- /TMPL_IF -->
                         <!-- /TMPL_IF -->
index 3dc2742..992e236 100755 (executable)
@@ -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 '' ) {