[Koha-patches] [PATCH] Fix for Bug 3262 - OPAC needs syspref to show homebranch on detail page

Owen Leonard oleonard at myacpl.org
Fri Dec 17 16:37:32 CET 2010


Revised version of Liz Rea's fix adding homebranch by default. This
revision displays the homebranch name instead of branchcode.
---
 catalogue/detail.pl                                |    2 ++
 .../prog/en/modules/catalogue/detail.tmpl          |    6 ++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/catalogue/detail.pl b/catalogue/detail.pl
index abf71ad..e32170c 100755
--- a/catalogue/detail.pl
+++ b/catalogue/detail.pl
@@ -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 ) );
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl
index db6fe31..d925eef 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl
@@ -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">
 
-- 
1.7.1



More information about the Koha-patches mailing list