[Koha-cvs] koha koha-tmpl/intranet-tmpl/prog/en/reviews/re... [rel_3_0]

Antoine Farnault antoine at koha-fr.org
Fri Dec 8 15:07:39 CET 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_3_0
Changes by:	Antoine Farnault <toins>	06/12/08 14:07:39

Modified files:
	koha-tmpl/intranet-tmpl/prog/en/reviews: reviewswaiting.tmpl 
	reviews        : reviewswaiting.pl 

Log message:
	now enable to manage reviews from intranet ON REL_3_0 !!

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/reviews/reviewswaiting.tmpl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.2&r2=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/reviews/reviewswaiting.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.2&r2=1.2.2.1

Patches:
Index: koha-tmpl/intranet-tmpl/prog/en/reviews/reviewswaiting.tmpl
===================================================================
RCS file: /sources/koha/koha/koha-tmpl/intranet-tmpl/prog/en/reviews/reviewswaiting.tmpl,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -b -r1.2 -r1.2.2.1
--- koha-tmpl/intranet-tmpl/prog/en/reviews/reviewswaiting.tmpl	17 Jun 2006 22:30:23 -0000	1.2
+++ koha-tmpl/intranet-tmpl/prog/en/reviews/reviewswaiting.tmpl	8 Dec 2006 14:07:39 -0000	1.2.2.1
@@ -1,25 +1,49 @@
-<!-- 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>
-<!-- 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>
-<!-- /TMPL_LOOP -->
+    <tr>
+        <th>
+            Authors
+        </th>
+        <th>
+            On biblio
+        </th>
+        <th>
+            Review
+        </th>
+        <th>
+            &nbsp;
+        </th>
+    </tr>
+    <!-- TMPL_LOOP NAME="reviews" -->
+    <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" -->
-

Index: reviews/reviewswaiting.pl
===================================================================
RCS file: /sources/koha/koha/reviews/reviewswaiting.pl,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -b -r1.2 -r1.2.2.1
--- reviews/reviewswaiting.pl	17 Jun 2006 22:29:37 -0000	1.2
+++ reviews/reviewswaiting.pl	8 Dec 2006 14:07:39 -0000	1.2.2.1
@@ -1,13 +1,29 @@
 #!/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(
@@ -32,6 +48,17 @@
 }
 
 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;





More information about the Koha-cvs mailing list