koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha bookcount.pl,1.4,1.5


From: Henri-Damien LAURENT
Subject: [Koha-cvs] CVS: koha bookcount.pl,1.4,1.5
Date: Wed, 13 Nov 2002 09:53:01 -0800

Update of /cvsroot/koha/koha
In directory usw-pr-cvs1:/tmp/cvs-serv31932

Modified Files:
        bookcount.pl 
Log Message:
Bookcount Templating
First template and commit

Index: bookcount.pl
===================================================================
RCS file: /cvsroot/koha/koha/bookcount.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** bookcount.pl        13 Oct 2002 07:31:21 -0000      1.4
--- bookcount.pl        13 Nov 2002 17:52:59 -0000      1.5
***************
*** 30,33 ****
--- 30,34 ----
  use C4::Circulation::Circ2;
  use C4::Output;
+ use HTML::Template;
  
  # get all the data ....
***************
*** 60,113 ****
  }
  
- 
  # make the page ...
! print $input->header;
! 
  
! print startpage;
! print startmenu('report');
! print center;
! 
! print <<"EOF";
! <br>
! <FONT SIZE=6><em><a 
href=/cgi-bin/koha/detail.pl?bib=$bib&type=intra>$data->{'title'} 
($data->{'author'})</a></em></FONT><P>
! <p>
! <img src="/images/holder.gif" width=16 height=200 align=left>
! <TABLE  CELLSPACING=0  CELLPADDING=5 border=1 width=440 >
!   <TR VALIGN=TOP><td  bgcolor="99cc33" 
background="/images/background-mem.gif">
!   <B>BARCODE $idata->{'barcode'}</b></TD>
! </TR>
! <TR VALIGN=TOP  >
! <TD width=440 >
! 
! <b>Home Branch: </b> $homebranch <br>
! <b>Current Branch: </b> $holdingbranch<br>
! <b>Date arrived at current branch: </b> $lastdate <br>
! <b>Number of issues since since the above date :</b> $count <br>
! 
! <table cellspacing =0 cellpadding=5 border=1 width = 440>
! <TR><TD > <b>Branch</b></td>  <TD >   <b>No. of Issues</b></td>   <td><b>Last 
seen at branch</b></td></TR>
! EOF
  
  foreach my $branchcode (keys %$branches) {
!     my $issues = issuesat($itm, $branchcode);
      my $date = lastseenat($itm, $branchcode);
!     my $seen = slashdate($date);
!     print << "EOF";
! <TR><TD > <b>$branches->{$branchcode}->{'branchname'}</b></td>
! <TD >    <b> $issues </b></td>             <td><b> $seen</b></td></TR>
! EOF
  }
- print <<"EOF";
- </table>
- </TR>
- 
- </table>
- EOF
- 
  
! print endmenu('report');
! print endpage;
  
  
  ##############################################
--- 61,89 ----
  }
  
  # make the page ...
! my $template = gettemplate("bookcount.tmpl");
  
! my @branchloop;
  
  foreach my $branchcode (keys %$branches) {
!       my %linebranch;
!     $linebranch{issues} = issuesat($itm, $branchcode);
      my $date = lastseenat($itm, $branchcode);
!     $linebranch{seen} = slashdate($date);
!       $linebranch{branchname}=$branches->{$branchcode}->{'branchname'};
!       push(@branchloop,\%linebranch);
  }
  
! $template->param(     bib => $bib,
!                                                               title => 
$data->{'title'},
!                                                               author => 
$data->{'author'},
!                                                               barcode => 
$idata->{'barcode'},
!                                                               homebranch 
=>$homebranch,
!                                                               holdingbranch 
=> $holdingbranch,
!                                                               lastdate =>  
$lastdate,
!                                                               count =>  
$count,
!                                                               branchloop => 
address@hidden);
  
+ print "Content-Type: text/html\n\n", $template->output;
  
  ##############################################




reply via email to

[Prev in Thread] Current Thread [Next in Thread]