[Koha-cvs] CVS: koha/opac opac-account.pl,1.1.2.1,1.1.2.2

Finlay Thompson finlayt at users.sourceforge.net
Fri Nov 29 02:54:35 CET 2002


Update of /cvsroot/koha/koha/opac
In directory sc8-pr-cvs1:/tmp/cvs-serv18322

Modified Files:
      Tag: rel-1-2
	opac-account.pl 
Log Message:

added line parities to to account lines


Index: opac-account.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-account.pl,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** opac-account.pl	14 Oct 2002 22:48:46 -0000	1.1.2.1
--- opac-account.pl	29 Nov 2002 01:54:32 -0000	1.1.2.2
***************
*** 12,25 ****
  
  my $query = new CGI;
! 
! my $flagsrequired;
! $flagsrequired->{borrow}=1;
! 
! my ($loggedinuser, $cookie, $sessionID) = checkauth($query, 0, $flagsrequired);
! 
! my $template = gettemplate("opac-account.tmpl", "opac");
  
  # get borrower information ....
- my $borrowernumber = getborrowernumber($loggedinuser);
  my ($borr, $flags) = getpatroninformation(undef, $borrowernumber);
  
--- 12,25 ----
  
  my $query = new CGI;
! my ($template, $borrowernumber, $cookie) 
!     = get_template_and_user({template_name => "opac-account.tmpl",
! 			     query => $query,
! 			     type => "opac",
! 			     authnotrequired => 0,
! 			     flagsrequired => {borrow => 1},
! 			     debug => 1,
! 			     });
  
  # get borrower information ....
  my ($borr, $flags) = getpatroninformation(undef, $borrowernumber);
  
***************
*** 41,48 ****
  }
  
  $template->param( ACCOUNT_LINES => $accts );
  
  $template->param( total => $total );
  
! $template->param( loggedinuser => $loggedinuser );
! print "Content-Type: text/html\n\n", $template->output; 
--- 41,56 ----
  }
  
+ # add the row parity
+ my $num = 0;
+ foreach my $row (@$accts) {
+     $row->{'even'} = 1 if $num % 2 == 0;
+     $row->{'odd'} = 1 if $num % 2 == 1;
+     $num++;
+ }
+ 
+ 
  $template->param( ACCOUNT_LINES => $accts );
  
  $template->param( total => $total );
  
! print $query->header(-cookie => $cookie), $template->output; 





More information about the Koha-cvs mailing list