[Koha-cvs] CVS: koha/reports reservereport.pl,1.5,1.6

Owen Leonard oleonard at users.sourceforge.net
Sat Sep 3 20:33:17 CEST 2005


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

Modified Files:
	reservereport.pl 
Log Message:
Moving HTML out of the script, passing variables instead to the template.  Adding toggle variable for alternating row colors

Index: reservereport.pl
===================================================================
RCS file: /cvsroot/koha/koha/reports/reservereport.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** reservereport.pl	27 Aug 2005 05:59:00 -0000	1.5
--- reservereport.pl	3 Sep 2005 18:33:15 -0000	1.6
***************
*** 23,27 ****
  use strict;
  use C4::Stats;
! use Date::Manip;
  use CGI;
  use C4::Output;
--- 23,27 ----
  use strict;
  use C4::Stats;
! use C4::Date;
  use CGI;
  use C4::Output;
***************
*** 47,60 ****
  
  my @dataloop;
  for ( my $i = 0 ; $i < $count ; $i++ ) {
- 
      my %line;
!     $line{name}             = "<p><a href=\"/cgi-bin/koha/members/moremember.pl?bornum=$data->[$i]->{'borrowernumber'}\">$data->[$i]->{'surname'}\, $data->[$i]->{'firstname'}</a></p>";
!     $line{'reservedate'}    = $data->[$i]->{'reservedate'};
!     $line{'title'}          = "<p><a href=\"/cgi-bin/koha/request.pl?bib=$data->[$i]->{'biblionumber'}\">$data->[$i]->{'title'}</a></p>"; #manky
!     $line{'classification'} = "$data->[$i]->{'classification'}$data->[$i]->{'dewey'}";
!     $line{'status'}         = $data->[$i]->{'found'};
! 
! warn "status : $line{'status'} \n";
  
      push( @dataloop, \%line );
--- 47,64 ----
  
  my @dataloop;
+ my $toggle;
  for ( my $i = 0 ; $i < $count ; $i++ ) {
      my %line;
! 	$toggle = $i%2 ? 0 : 1;
! 	$line{'borrowernumber'} = $data->[$i]->{'borrowernumber'};
! 	$line{'surname'} = $data->[$i]->{'surname'};
! 	$line{'firstname'} = $data->[$i]->{'firstname'};
!     $line{'reservedate'}    = format_date($data->[$i]->{'reservedate'});
! 	$line{'biblionumber'} = $data->[$i]->{'biblionumber'};
! 	$line{'title'} = $data->[$i]->{'title'};
! 	$line{'classification'} = $data->[$i]->{'classification'};
! 	$line{'dewey'} = $data->[$i]->{'dewey'};
!     $line{'status'} = $data->[$i]->{'found'};
! 	$line{'toggle'} = $toggle;
  
      push( @dataloop, \%line );





More information about the Koha-cvs mailing list