3 # This file is part of Koha.
5 # Koha is free software; you can redistribute it and/or modify it under the
6 # terms of the GNU General Public License as published by the Free Software
7 # Foundation; either version 2 of the License, or (at your option) any later
10 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
11 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License along with
15 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
16 # Suite 330, Boston, MA 02111-1307 USA
33 my ( $template, $borrowernumber, $cookie ) = get_template_and_user
(
35 template_name
=> "opac-readingrecord.tmpl",
39 flagsrequired
=> { borrow
=> 1 },
44 # get borrower information ....
45 my ( $borr, $flags ) = GetMemberDetails
( $borrowernumber );
47 $template->param($borr);
50 my $order = $query->param('order');
52 if ( $order2 eq '' ) {
53 $order2 = "date_due desc";
54 $template->param( orderbydate
=> 1 );
57 if ( $order2 eq 'title' ) {
58 $template->param( orderbytitle
=> 1 );
61 if ( $order2 eq 'author' ) {
62 $template->param( orderbyauthor
=> 1 );
65 my $limit = $query->param('limit');
66 if ( $limit eq 'full' ) {
72 my ( $count, $issues ) = GetAllIssues
( $borrowernumber, $order2, $limit );
76 #foreach my $row (@$issues) {
77 # $row->{'even'} = 1 if $num % 2 == 0;
78 # $row->{'odd'} = 1 if $num % 2 == 1;
84 for ( my $i = 0 ; $i < $count ; $i++ ) {
89 $line{biblionumber
} = $issues->[$i]->{'biblionumber'};
90 $line{title
} = $issues->[$i]->{'title'};
91 $line{author
} = $issues->[$i]->{'author'};
92 $line{classification
} = $issues->[$i]->{'classification'};
93 $line{date_due
} = format_date
( $issues->[$i]->{'date_due'} );
94 $line{returndate
} = format_date
( $issues->[$i]->{'returndate'} );
95 $line{volumeddesc
} = $issues->[$i]->{'volumeddesc'};
96 $line{counter
} = $i + 1;
97 push( @loop_reading, \
%line );
102 READING_RECORD
=> \
@loop_reading,
104 showfulllink
=> ( $count > 50 ),
107 output_html_with_http_headers
$query, $cookie, $template->output;