Add barcode to staff search results page.
authorMichael Hafen <mdhafen@tech.washk12.org>
Fri, 13 Feb 2009 22:17:52 +0000 (15:17 -0700)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 4 Mar 2009 11:47:38 +0000 (12:47 +0100)
This adds a copy barcode do the item list (Location) on the staff search
results page.

C4/Search.pm
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl

index 60e4cfe..26022b5 100644 (file)
@@ -1392,6 +1392,7 @@ s/\[(.?.?.?.?)$tagsubf(.*?)]/$1$subfieldvalue$2\[$1$tagsubf$2]/g;
                                $onloan_items->{$key}->{location} = $shelflocations->{ $item->{location} };
                                $onloan_items->{$key}->{itemcallnumber} = $item->{itemcallnumber};
                                $onloan_items->{$key}->{imageurl} = getitemtypeimagelocation( 'opac', $itemtypes{ $item->{itype} }->{imageurl} );
+                               $onloan_items->{$key}->{barcode} = $item->{barcode};
                 # if something's checked out and lost, mark it as 'long overdue'
                 if ( $item->{itemlost} ) {
                     $onloan_items->{$prefix}->{longoverdue}++;
@@ -1457,13 +1458,14 @@ s/\[(.?.?.?.?)$tagsubf(.*?)]/$1$subfieldvalue$2\[$1$tagsubf$2]/g;
                                        $other_items->{$key}->{count}++ if $item->{$hbranch};
                                        $other_items->{$key}->{location} = $shelflocations->{ $item->{location} };
                                        $other_items->{$key}->{imageurl} = getitemtypeimagelocation( 'opac', $itemtypes{ $item->{itype} }->{imageurl} );
+                                       $other_items->{$key}->{barcode} = $item->{barcode};
                 }
                 # item is available
                 else {
                     $can_place_holds = 1;
                     $available_count++;
                                        $available_items->{$prefix}->{count}++ if $item->{$hbranch};
-                                       foreach (qw(branchname itemcallnumber)) {
+                                       foreach (qw(branchname itemcallnumber barcode)) {
                        $available_items->{$prefix}->{$_} = $item->{$_};
                                        }
                                        $available_items->{$prefix}->{location} = $shelflocations->{ $item->{location} };
index 2be8862..39d3d29 100644 (file)
@@ -334,6 +334,7 @@ $(window).load(function() {
                                         <!-- TMPL_IF NAME="branchname" --><!-- TMPL_VAR NAME="branchname" --><!-- /TMPL_IF -->
                                         <!-- TMPL_IF NAME="location" --><!-- TMPL_VAR NAME="location" --><!-- /TMPL_IF -->
                                         <!-- TMPL_IF NAME="itemcallnumber" -->[<a href="/cgi-bin/koha/catalogue/search.pl?q=callnum:<!-- TMPL_VAR NAME="itemcallnumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="itemcallnumber" --></a>]<!-- /TMPL_IF -->
+                                        <!-- TMPL_IF NAME="barcode" -->(<!-- TMPL_VAR NAME="barcode" -->)<!-- /TMPL_IF -->
                                         (<!-- TMPL_VAR NAME="count" -->)</li>
                                     <!-- /TMPL_LOOP --></ul>
                                     <!-- TMPL_ELSE -->
@@ -353,6 +354,7 @@ $(window).load(function() {
                                         <!-- TMPL_IF NAME="branchname" --><!-- TMPL_VAR NAME="branchname" --><!-- /TMPL_IF -->
                                         <!-- TMPL_IF NAME="location" --><!-- TMPL_VAR NAME="location" --><!-- /TMPL_IF -->
                                         <!-- TMPL_IF NAME="itemcallnumber" -->[<a href="/cgi-bin/koha/catalogue/search.pl?q=callnum:<!-- TMPL_VAR NAME="itemcallnumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="itemcallnumber" --></a>]<!-- /TMPL_IF -->
+                                        <!-- TMPL_IF NAME="barcode" -->(<!-- TMPL_VAR NAME="barcode" -->)<!-- /TMPL_IF -->
                                         (<!-- TMPL_VAR NAME="count" --><!-- TMPL_IF NAME="longoverdue" -->, <!-- TMPL_VAR NAME="longoverdue" --> long overdue<!-- /TMPL_IF -->) date due: <!-- TMPL_VAR NAME="due_date" --></li>
                                     <!-- /TMPL_LOOP --></ul>
                                     <!-- /TMPL_IF -->
@@ -370,6 +372,7 @@ $(window).load(function() {
                                         <!-- TMPL_IF NAME="branchname" --><!-- TMPL_VAR NAME="branchname" --><!-- /TMPL_IF -->
                                         <!-- TMPL_IF NAME="location" --><!-- TMPL_VAR NAME="location" --><!-- /TMPL_IF -->
                                         <!-- TMPL_IF NAME="itemcallnumber" -->[<a href="/cgi-bin/koha/catalogue/search.pl?q=callnum:<!-- TMPL_VAR NAME="itemcallnumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="itemcallnumber" --></a>]<!-- /TMPL_IF -->
+                                        <!-- TMPL_IF NAME="barcode" -->(<!-- TMPL_VAR NAME="barcode" -->)<!-- /TMPL_IF -->
                                         <!-- TMPL_IF NAME="wthdrawn" -->(Withdrawn)<!-- /TMPL_IF -->
                                         <!-- TMPL_IF NAME="itemlost" -->(Lost)<!-- /TMPL_IF -->
                                         <!-- TMPL_IF NAME="damaged" -->(Damaged)<!-- /TMPL_IF -->