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
30 my ( $template, $loggedinuser, $cookie ) = get_template_and_user
(
32 template_name
=> "reviews/reviewswaiting.tmpl",
36 flagsrequired
=> { tools
=> 'moderate_comments' },
41 my $op = $query->param('op') || '';
42 my $reviewid = $query->param('reviewid');
44 if ( $op eq 'approve' ) {
45 approvereview
($reviewid);
47 elsif ( $op eq 'delete' ) {
48 deletereview
($reviewid);
51 my $reviews = getallreviews
(0);
53 foreach ( @
$reviews ) {
54 my $borrowernumber = $_->{borrowernumber
};
55 my $borrowerData = GetMember
('borrowernumber' => $borrowernumber);
56 my $biblioData = GetBiblioData
($_->{biblionumber
});
57 # setting some borrower info into this hash
58 $_->{bibliotitle
} = $biblioData->{'title'};
59 $_->{surname
} = $borrowerData->{'surname'};
60 $_->{firstname
} = $borrowerData->{'firstname'};
63 $template->param( reviews
=> $reviews );
65 output_html_with_http_headers
$query, $cookie, $template->output;