[Koha-cvs] CVS: koha/circ circulation.pl,1.81.2.4,1.81.2.5

Owen Leonard oleonard at users.sourceforge.net
Tue Jul 19 20:50:52 CEST 2005


Update of /cvsroot/koha/koha/circ
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15633/circ

Modified Files:
      Tag: rel_2_2
	circulation.pl 
Log Message:
Fixing section that was supposed to allow for alternating table row colors

Index: circulation.pl
===================================================================
RCS file: /cvsroot/koha/koha/circ/circulation.pl,v
retrieving revision 1.81.2.4
retrieving revision 1.81.2.5
diff -C2 -r1.81.2.4 -r1.81.2.5
*** circulation.pl	31 Mar 2005 16:42:43 -0000	1.81.2.4
--- circulation.pl	19 Jul 2005 18:50:49 -0000	1.81.2.5
***************
*** 196,199 ****
--- 196,200 ----
      }
  	my $od; # overdues
+ 	my $i = 0;
  	my $togglecolor;
  	# parses today & build Template array
***************
*** 208,226 ****
  			$od=0;
  		}
! 		$book->{'od'}=$od;
! 		$book->{'dd'}=$dd;
! 		$book->{'tcolor'}=$togglecolor;
! 		if ($togglecolor) {
  			$togglecolor=0;
  		} else {
  			$togglecolor=1;
  		}
  		if ($book->{'author'} eq ''){
  			$book->{'author'}=' ';
  		}    
  		push @realtodayissues,$book;
  	}
  
  	# parses previous & build Template array
      foreach my $book (sort {$a->{'date_due'} cmp $b->{'date_due'}} @previousissues){
  		my $dd = $book->{'date_due'};
--- 209,229 ----
  			$od=0;
  		}
! 		if ($i%2) {
  			$togglecolor=0;
  		} else {
  			$togglecolor=1;
  		}
+ 		$book->{'togglecolor'} = $togglecolor;
+ 		$book->{'od'}=$od;
+ 		$book->{'dd'}=$dd;
  		if ($book->{'author'} eq ''){
  			$book->{'author'}=' ';
  		}    
  		push @realtodayissues,$book;
+ 		$i++;
  	}
  
  	# parses previous & build Template array
+ 	$i = 0;
      foreach my $book (sort {$a->{'date_due'} cmp $b->{'date_due'}} @previousissues){
  		my $dd = $book->{'date_due'};
***************
*** 235,251 ****
  			$od = 0;
  		}
! 		$book->{'tcolor'}=$togglecolor;
! 		if ($togglecolor) {
  			$togglecolor=0;
  		} else {
  			$togglecolor=1;
  		}
  		$book->{'dd'}=$dd; 
  		$book->{'od'}=$od;
- 		$book->{'tcolor'}=$pcolor;
  		if ($book->{'author'} eq ''){
  			$book->{'author'}=' ';
  		}    
! 		push @realprevissues,$book
  	}
  }
--- 238,254 ----
  			$od = 0;
  		}
! 		if ($i%2) {
  			$togglecolor=0;
  		} else {
  			$togglecolor=1;
  		}
+ 		$book->{'togglecolor'} = $togglecolor;
  		$book->{'dd'}=$dd; 
  		$book->{'od'}=$od;
  		if ($book->{'author'} eq ''){
  			$book->{'author'}=' ';
  		}    
! 		push @realprevissues,$book;
! 		$i++;
  	}
  }





More information about the Koha-cvs mailing list