From rangi@users.sourceforge.net Thu Apr 19 17:31:06 2001 From: Chris Cormack To: koha-devel@lists.koha-community.org Subject: [Koha-devel] CVS: koha/circ circulation.pl,1.18,1.19 Date: Thu, 19 Apr 2001 17:31:04 -0700 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2576172901886280234==" --===============2576172901886280234== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Update of /cvsroot/koha/koha/circ In directory usw-pr-cvs1:/tmp/cvs-serv23523/circ Modified Files: circulation.pl=20 Log Message: Quick bodge to restrict the number of returned books showing to 8. (Request from the librarians here to speed up the screen reload) Needs to be tidied up Index: circulation.pl =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/koha/koha/circ/circulation.pl,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** circulation.pl 2001/04/03 21:32:37 1.18 --- circulation.pl 2001/04/20 00:31:02 1.19 *************** *** 383,391 **** --- 383,399 ---- EOF my $color=3D''; + #set up so only the lat 8 returned items display (make for faster loading = pages) + my $count=3D0; foreach (sort {$a <=3D> $b} keys %returneditems) { + if ($count < 8){ ($color eq $linecolor1) ? ($color=3D$linecolor2) : ($color=3D$linecolo= r1); my $barcode=3D$returneditems{$_}; my $duedate=3D$riduedate{$_}; my @datearr =3D localtime(time()); + ### + # convert to nz date format + my @tempdate=3Dsplit(/-/,$duedate); + $duedate=3D"$tempdate[2]/$tempdate[1]/$tempdate[0]"; + #### my $todaysdate =3D (1900+$datearr[5]).'-'.sprintf ("%0.2d", ($datearr[= 4]+1)).'-'.sprintf ("%0.2d", $datearr[3]); my $overduetext=3D"$duedate"; *************** *** 396,399 **** --- 404,411 ---- my ($iteminformation) =3D getiteminformation(\%env, 0, $barcode); print "$overduetext{'bi= blionumber'}&type=3Dintra onClick=3D\"openWindow(this, 'Item', 480, 640)\">$b= arcode$iteminformation->{'title'}$iteminformation->{'author'}$iteminformation->{'itemtype'}{'borrowernumber'} onClick=3D\"openWindow(this,'Member', 480, 640)\">$borrow= er->{'cardnumber'} $borrower->{'firstname'} $borrower->{'surname'}\n"; + } else { + last + } + $count++; } print "\n"; *************** *** 635,638 **** --- 647,657 ---- my $datedue=3D$bookissue->{'date_due'}; my $dd=3D$bookissue->{'date_due'}; + #convert to nz style dates + #this should be set with some kinda config variable + =20 + my @tempdate=3Dsplit(/-/,$dd); + $dd=3D"$tempdate[2]/$tempdate[1]/$tempdate[0]"; + =20 + ##### $datedue=3D~s/-//g; if ($datedue < $todaysdate) { --===============2576172901886280234==--