Fix for Bug 3262 - OPAC needs syspref to show homebranch on detail page
authorOwen Leonard <oleonard@myacpl.org>
Thu, 16 Dec 2010 11:42:51 +0000 (06:42 -0500)
committerChris Nighswonger <chris.nighswonger@gmail.com>
Fri, 24 Dec 2010 04:17:46 +0000 (23:17 -0500)
Revised version of Liz Rea's fix adding homebranch by default. This
revision displays the homebranch name instead of branchcode.

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 75762a63e940040d3d9bcc26566b0079000078a8)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
catalogue/detail.pl
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl

index abf71ad..e32170c 100755 (executable)
@@ -139,6 +139,8 @@ my $authvalcode_items_itemlost = GetAuthValCode('items.itemlost',$fw);
 my $authvalcode_items_damaged  = GetAuthValCode('items.damaged', $fw);
 foreach my $item (@items) {
 
+    $item->{homebranch}        = GetBranchName($item->{homebranch});
+
     # can place holds defaults to yes
     $norequests = 0 unless ( ( $item->{'notforloan'} > 0 ) || ( $item->{'itemnotforloan'} > 0 ) );
 
index db6fe31..d925eef 100644 (file)
@@ -215,7 +215,8 @@ function verify_images() {
         <table>
             <tr>
                 <!-- TMPL_IF NAME="item-level_itypes" --><th>Item type</th><!-- /TMPL_IF -->
-                <th>Location</th>
+                <th>Current Location</th>
+                <th>Home Library</th>
                 <!-- TMPL_IF NAME="itemdata_ccode" --><th>Collection</th><!-- /TMPL_IF -->
                 <th>Call Number</th>
                 <th>Status</th>
@@ -242,7 +243,8 @@ function verify_images() {
                         <!-- /TMPL_IF --></td>
                     <!-- /TMPL_IF -->
                     <td class="location"><!-- TMPL_UNLESS NAME="singlebranchmode" --><!-- TMPL_VAR NAME="branchname" --> <!-- /TMPL_UNLESS --><span class="shelvingloc"><!-- TMPL_VAR NAME="location" --></span> </td>
-                    <!-- TMPL_IF NAME="itemdata_ccode" --><td><!-- TMPL_VAR name="ccode" --></td><!-- /TMPL_IF -->
+                    <td class="homebranch"><!-- TMPL_VAR NAME="homebranch" -->
+                   <!-- TMPL_IF NAME="itemdata_ccode" --><td><!-- TMPL_VAR name="ccode" --></td><!-- /TMPL_IF -->
                     <td class="itemcallnumber"><!-- TMPL_IF NAME="itemcallnumber" --> <!-- TMPL_VAR NAME="itemcallnumber" --><!-- /TMPL_IF --></td>
                     <td class="status">