[Koha-patches] [PATCH] BUG 3380 Show serial enumeration on opac holds screen

Katrin Fischer katrin.fischer.83 at web.de
Sun Sep 27 23:54:29 CEST 2009


Shows column 'Vol Info' on opac holds screen if serial enumeration / items.enumchron was set for one of the items.

Replaces first patch.

---
 .../opac-tmpl/prog/en/modules/opac-reserve.tmpl    |    8 +++++++-
 opac/opac-reserve.pl                               |    8 ++++++++
 2 files changed, 15 insertions(+), 1 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 3ac7343..d853924 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl
@@ -243,7 +243,7 @@
 		  <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>
@@ -419,6 +419,9 @@
                               <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>
 
@@ -445,6 +448,9 @@
                                 <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>
diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl
index 4471dff..abb9841 100755
--- a/opac/opac-reserve.pl
+++ b/opac/opac-reserve.pl
@@ -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;
     }
-- 
1.6.0.4

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-BUG-3380-Show-serial-enumeration-on-opac-holds-scree.patch
Type: text/x-patch
Size: 3847 bytes
Desc: not available
URL: </pipermail/koha-patches/attachments/20090927/69d41a5c/attachment-0002.bin>


More information about the Koha-patches mailing list