From 2dcd520cedd528052581807b33e3beb5ae061070 Mon Sep 17 00:00:00 2001 From: tipaul Date: Mon, 28 Oct 2002 21:15:11 +0000 Subject: [PATCH] templating : readingrec.pl --- readingrec.pl | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/readingrec.pl b/readingrec.pl index 00e50993c8..7315dc3870 100755 --- a/readingrec.pl +++ b/readingrec.pl @@ -26,6 +26,7 @@ use strict; use C4::Output; use CGI; use C4::Search; +use HTML::Template; my $input=new CGI; @@ -46,18 +47,28 @@ if ($limit eq 'full'){ my ($count,$issues)=allissues($bornum,$order2,$limit); -print $input->header; -print startpage(); -print startmenu('member'); -#print $count; -print mkheadr(3,"$data->{'title'} $data->{'initials'} $data->{'surname'}"); -print mktablehdr(); -print mktablerow(1,'white',"Full output"); -print mktablerow(4,'white',"TITLE","AUTHOR","DATE","Volume"); +#print $input->header; +#print startpage(); +#print startmenu('member'); +my $template = gettemplate("members/readingrec.tmpl"); + +my @loop_reading; + for (my $i=0;$i<$count;$i++){ - print mktablerow(4,'white',$issues->[$i]->{'title'},$issues->[$i]->{'author'},$issues->[$i]->{'returndate'},$issues->[$i]->{'volumeddesc'}); + my %line; + $line{title}=$issues->[$i]->{'title'}; + $line{author}=$issues->[$i]->{'author'}; + $line{returndate}=$issues->[$i]->{'returndate'}; + $line{volumeddesc}=$issues->[$i]->{'volumeddesc'}; + push(@loop_reading,\%line); } -print mktableft(); -print endmenu('member'); -print endpage(); +$template->param(title => $data->{'title'}, + initials => $data->{'initials'}, + surname => $data->{'surname'}, + bornum => $bornum, + limit => $limit, + loop_reading => \@loop_reading); +print "Content-Type: text/html\n\n", $template->output; + + -- 2.39.5