From 4d587f16cd672d996071aec9bc9a620b9b9dfffe Mon Sep 17 00:00:00 2001 From: plg Date: Tue, 18 Apr 2006 10:32:24 +0000 Subject: [PATCH] improvement: in member details page, issue and reserve lines are toggled. --- .../intranet-tmpl/prog/en/members/moremember.tmpl | 12 ++++++++++-- members/moremember.pl | 4 ++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/members/moremember.tmpl b/koha-tmpl/intranet-tmpl/prog/en/members/moremember.tmpl index 0046af81c1..a952f985e9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/members/moremember.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/members/moremember.tmpl @@ -137,7 +137,11 @@ - + + + + + @@ -196,7 +200,11 @@ - + + + + + "> diff --git a/members/moremember.pl b/members/moremember.pl index 92e63cc1fa..e9583b5ff9 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -159,6 +159,7 @@ my ($count,$issue)=borrissues($bornum); my $today=ParseDate('today'); my @issuedata; my $totalprice = 0; +my $toggle = 0; for (my $i=0;$i<$count;$i++){ my $datedue=ParseDate($issue->[$i]{'date_due'}); $issue->[$i]{'date_due'} = format_date($issue->[$i]{'date_due'}); @@ -168,6 +169,7 @@ for (my $i=0;$i<$count;$i++){ if ($datedue < $today){ $row{'red'}=1; #print ""; } + $row{toggle} = $toggle++%2; #find the charge for an item # FIXME - This is expecting # &C4::Circulation::Renewals2::calc_charges, but it's getting @@ -202,10 +204,12 @@ for (my $i=0;$i<$count;$i++){ # my ($rescount,$reserves)=FindReserves('',$bornum); #From C4::Reserves2 my @reservedata; +$toggle = 0; foreach my $reserveline (@$reserves) { $reserveline->{'reservedate2'} = format_date($reserveline->{'reservedate'}); my $restitle; my %row = %$reserveline; + $row{toggle} = $toggle++%2; if ($reserveline->{'constrainttype'} eq 'o'){ $restitle=getreservetitle($reserveline->{'biblionumber'},$reserveline->{'borrowernumber'},$reserveline->{'reservedate'},$reserveline->{'rtimestamp'}); %row = (%row , %$restitle) if $restitle; -- 2.39.5