-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Reviews waiting for Approval --<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- Additions to enable Calendar system -->
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
-<!-- End of additions --><!-- Additions to enable Calendar system -->
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-en.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-setup.js"></script>
-<!-- End of additions -->
-<!-- ------------------------MAIN BODY OF PAGE------------------------ -->
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
+ Reviews waiting for Approval --
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+
+<!-- TMPL_INCLUDE NAME="menus.inc" -->
+<!--TMPL_INCLUDE NAME="menu-serials.inc" -->
<h1>Reviews</h1>
+<!-- TMPL_IF NAME="reviews" -->
<table>
+ <tr>
+ <th>
+ Authors
+ </th>
+ <th>
+ On biblio
+ </th>
+ <th>
+ Review
+ </th>
+ <th>
+
+ </th>
+ </tr>
<!-- TMPL_LOOP NAME="reviews" -->
-<tr>
-<td><!-- TMPL_VAR NAME="review" -->
-</td>
-<td><a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=approve&reviewid=<!-- TMPL_VAR NAME="reviewid" -->">Approve</a></td>
-<td><a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=delete&reviewid=<!-- TMPL_VAR NAME="reviewid" -->">Delete</a></td>
-</tr>
+ <tr>
+ <td>
+ <!-- TMPL_VAR NAME="surname" -->
+ <!-- TMPL_VAR NAME="firstname" -->
+ </td>
+ <td>
+ <!-- TMPL_VAR NAME="bibliotitle" -->
+ </td>
+ <td>
+ <!-- TMPL_VAR NAME="review" -->
+ </td>
+ <td>
+ <a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=approve&reviewid=<!-- TMPL_VAR NAME="reviewid" -->">Approve</a> |
+ <a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=delete&reviewid=<!-- TMPL_VAR NAME="reviewid" -->">Delete</a>
+ </td>
+ </tr>
<!-- /TMPL_LOOP -->
</table>
+<!-- TMPL_ELSE -->
+ <b>No reviews has been writed.</b>
+<!-- /TMPL_IF -->
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
-
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file
#!/usr/bin/perl
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA 02111-1307 USA
+
use strict;
use CGI;
use C4::Auth;
use C4::Output;
use C4::Interface::CGI::Output;
use C4::Context;
-use HTML::Template;
use C4::Review;
+use C4::Members;
+use C4::Biblio;
my $query = new CGI;
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
}
my $reviews = getallreviews(0);
+
+foreach ( @$reviews ) {
+ my $borrowernumber = $_->{borrowernumber};
+ my $borrowerData = GetMember('',$borrowernumber);
+ my $biblioData = GetBiblioData($_->{biblionumber});
+ # setting some borrower info into this hash
+ $_->{bibliotitle} = $biblioData->{'title'};
+ $_->{surname} = $borrowerData->{'surname'};
+ $_->{firstname} = $borrowerData->{'firstname'};
+}
+
$template->param( reviews => $reviews );
output_html_with_http_headers $query, $cookie, $template->output;