From c938fa7baf7a7c1df9d6b25aeb8003401f883371 Mon Sep 17 00:00:00 2001 From: oleonard Date: Wed, 27 Apr 2005 17:17:41 +0000 Subject: [PATCH] Moving alternating row colors to the template, adding publicationyear and itemtype variables --- bookshelves/shelves.pl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bookshelves/shelves.pl b/bookshelves/shelves.pl index 3ab48a3689..351e8541b8 100755 --- a/bookshelves/shelves.pl +++ b/bookshelves/shelves.pl @@ -107,7 +107,7 @@ foreach my $element (sort keys %$shelflist) { $line{'surname'}=$shelflist->{$element}->{'surname'} unless $shelflist->{$element}->{'owner'} eq $loggedinuser; ; push (@shelvesloop, \%line); -} + } $template->param(shelvesloop => \@shelvesloop); output_html_with_http_headers $query, $cookie, $template->output; @@ -169,12 +169,14 @@ sub viewshelf { my @itemsloop; foreach $item (sort {$a->{'barcode'} cmp $b->{'barcode'}} @$itemlist) { my %line; - ($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1); - $line{'color'}=$color; + ($color eq 1) ? ($color=0) : ($color=1); + $line{'toggle'}=$color; $line{'itemnumber'}=$item->{'itemnumber'}; $line{'barcode'}=$item->{'barcode'}; $line{'title'}=$item->{'title'}; $line{'author'}=$item->{'author'}; + $line{'publicationyear'}=$item->{'publicationyear'}; + $line{'itemtype'}=$item->{'itemtype'}; $line{biblionumber} = $item->{biblionumber}; push(@itemsloop, \%line); } @@ -188,6 +190,9 @@ sub viewshelf { # # $Log$ +# Revision 1.6 2005/04/27 17:17:41 oleonard +# Moving alternating row colors to the template, adding publicationyear and itemtype variables +# # Revision 1.5 2004/12/16 11:30:57 tipaul # adding bookshelf features : # * create bookshelf on the fly -- 2.39.5