BUG 3380 Show serial enumeration on opac holds screen
authorKatrin Fischer <Katrin.Fischer.83@web.de>
Sun, 27 Sep 2009 21:24:22 +0000 (23:24 +0200)
committerGalen Charlton <gmcharlt@gmail.com>
Tue, 29 Sep 2009 22:49:07 +0000 (18:49 -0400)
Shows column Vol Info if serial enumeration is used for one of the items.
Replaces first patch.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl
opac/opac-reserve.pl

index 3ac7343..d853924 100644 (file)
                  <th>Hold Starts on Date</th>
                  <!-- /TMPL_IF -->
                   <!-- TMPL_IF NAME="OPACItemHolds" -->
-                    <th id="place_on_hdr" style="display:none">Place On:</th>
+                    <th id="place_on_hdr" style="display:none">Place On</th>
                   <!-- /TMPL_IF -->
                   <!-- TMPL_UNLESS NAME="singleBranchMode" -->
                     <th>Pickup Location</th>
                               <th>Last Location</th>
                             <!-- /TMPL_UNLESS -->
                             <th>Call Number</th>
+                            <!-- TMPL_IF NAME="itemdata_enumchron" -->
+                              <th>Vol Info</th>
+                            <!-- /TMPL_IF -->
                             <th>Information</th>
                           </tr>
 
                                 <td><!-- TMPL_VAR NAME="holdingBranchName" --></td>
                               <!-- /TMPL_UNLESS -->
                               <td><!-- TMPL_VAR NAME="callNumber" --></td>
+                              <!-- TMPL_IF NAME="itemdata_enumchron" --><!-- test -->
+                                <td><!-- TMPL_VAR NAME="enumchron" --></td>
+                              <!-- /TMPL_IF -->
                               <td>
                                 <!-- TMPL_IF NAME="date_due" -->
                                   <span class="checkedout">Due <!-- TMPL_VAR NAME="date_due" --></span>
index 4471dff..abb9841 100755 (executable)
@@ -293,6 +293,7 @@ my $notforloan_label_of = get_notforloan_label_of();
 
 my $biblioLoop = [];
 my $numBibsAvailable = 0;
+my $itemdata_enumchron = 0;
 my $itemLevelTypes = C4::Context->preference('item-level_itypes');
 $template->param('item-level_itypes' => $itemLevelTypes);
 
@@ -353,6 +354,7 @@ foreach my $biblioNum (@biblionumbers) {
         $itemLoopIter->{barcode} = $itemInfo->{barcode};
         $itemLoopIter->{homeBranchName} = $branches->{$itemInfo->{homebranch}}{branchname};
         $itemLoopIter->{callNumber} = $itemInfo->{itemcallnumber};
+        $itemLoopIter->{enumchron} = $itemInfo->{enumchron};
         $itemLoopIter->{copynumber} = $itemInfo->{copynumber};
         if ($itemLevelTypes) {
             $itemLoopIter->{description} = $itemInfo->{description};
@@ -443,6 +445,12 @@ 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;    
+    }
+    $template->param( itemdata_enumchron => $itemdata_enumchron );
         
         push @{$biblioLoopIter{itemLoop}}, $itemLoopIter;
     }