[Koha-cvs] koha/opac opac-shelves.pl [dev_week]

Joshua Ferraro jmf at kados.org
Tue Aug 29 16:04:58 CEST 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		dev_week
Changes by:	Joshua Ferraro <kados>	06/08/29 14:04:58

Modified files:
	opac           : opac-shelves.pl 

Log message:
	some bugfixes to shelves:
	
	* shelves without names don't show up in the list
	* items without titles don't show up
	
	Joshua

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/opac/opac-shelves.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.3.2.8.2.1&r2=1.3.2.8.2.2

Patches:
Index: opac-shelves.pl
===================================================================
RCS file: /sources/koha/koha/opac/opac-shelves.pl,v
retrieving revision 1.3.2.8.2.1
retrieving revision 1.3.2.8.2.2
diff -u -b -r1.3.2.8.2.1 -r1.3.2.8.2.2
--- opac-shelves.pl	18 Aug 2006 16:14:15 -0000	1.3.2.8.2.1
+++ opac-shelves.pl	29 Aug 2006 14:04:58 -0000	1.3.2.8.2.2
@@ -2,7 +2,7 @@
 #script to provide bookshelf management
 # WARNING: This file uses 4-character tabs!
 #
-# $Header: /sources/koha/koha/opac/opac-shelves.pl,v 1.3.2.8.2.1 2006/08/18 16:14:15 kados Exp $
+# $Header: /sources/koha/koha/opac/opac-shelves.pl,v 1.3.2.8.2.2 2006/08/29 14:04:58 kados Exp $
 #
 # Copyright 2000-2002 Katipo Communications
 #
@@ -95,6 +95,7 @@
 my @shelvesloop;
 foreach my $element (sort keys %$shelflist) {
 		my %line;
+		if ($shelflist->{$element}->{'shelfname'}) {
 		($color eq 0) ? ($color=1) : ($color=0);
 		$line{'color'}= $color;
 		$line{'shelf'}=$element;
@@ -105,8 +106,8 @@
 		$line{'canmanage'} = ShelfPossibleAction($loggedinuser,$element,'manage');
 		$line{'firstname'}=$shelflist->{$element}->{'firstname'} unless $shelflist->{$element}->{'owner'} eq $loggedinuser;
 		$line{'surname'}=$shelflist->{$element}->{'surname'} unless $shelflist->{$element}->{'owner'} eq $loggedinuser;
-;
 		push (@shelvesloop, \%line);
+		}
 }
 $template->param(shelvesloop => \@shelvesloop);
 
@@ -169,6 +170,7 @@
 	my @itemsloop;
 	foreach $item (sort {$a->{'barcode'} cmp $b->{'barcode'}} @$itemlist) {
 		my %line;
+		if ($item->{'itemnumber'}) {
 		($color eq 0) ? ($color=1) : ($color=0);
 		$line{'color'}=$color;
 		$line{'itemnumber'}=$item->{'itemnumber'};
@@ -180,6 +182,7 @@
 		$line{biblionumber} = $item->{biblionumber};
 		push(@itemsloop, \%line);
 	}
+	}
 	$template->param(	itemsloop => \@itemsloop,
 						shelfname => $shelflist->{$shelfnumber}->{'shelfname'},
 						shelfnumber => $shelfnumber,
@@ -190,6 +193,14 @@
 
 #
 # $Log: opac-shelves.pl,v $
+# Revision 1.3.2.8.2.2  2006/08/29 14:04:58  kados
+# some bugfixes to shelves:
+#
+# * shelves without names don't show up in the list
+# * items without titles don't show up
+#
+# Joshua
+#
 # Revision 1.3.2.8.2.1  2006/08/18 16:14:15  kados
 # Adding langauge switching options to all scripts. Some general cleanup
 # on module namespaces.





More information about the Koha-cvs mailing list