padding : 3px 3px .5em 1em;
}
+#further ul li {
+ list-style-image : url("../../images/further-bullet.gif");
+}
+
#similars {
background-color : #FFF;
text-align : center;
input.editshelf:active,input.deleteshelf:active {
border : 0;
+}
+
+#comments .commentline {
+ border-bottom : 2px solid #eeeeeb;
+ margin : 0 -.5em 0 -.5em;
+ padding : 0 .5em .5em .5em;
+}
+#comments .yours {
+ background-color : #effed5;
+}
+#comments #addcomment {
+ margin : 0 -1em -1em -1em;
+ padding : .3em 1em;
}
\ No newline at end of file
<div id="comments">
<!-- TMPL_IF NAME="reviews" -->
<!--TMPL_LOOP NAME="reviews"-->
- <h5>
+ <!-- TMPL_IF NAME="loggedinusername" -->
+ <!-- TMPL_IF EXPR="userid eq loggedinusername" -->
+ <div class="commentline yours">
+ <h5>
+ Your Comment
+ </h5>
+ <small>
+ <!--TMPL_VAR NAME="datereviewed"-->
+ </small>
+ <p>
+ <!--TMPL_VAR NAME="review"--> <a href="#" onclick="Dopop('/cgi-bin/koha/opac-review.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber"-->');">Edit</a>
+ </p></div>
+ <!-- TMPL_ELSE -->
+ <div class="commentline">
+ <h5>
Comment by
<!--TMPL_VAR NAME="title"-->
<!--TMPL_VAR NAME="firstname"-->
</small>
<p>
<!--TMPL_VAR NAME="review"-->
- </p>
+ </p></div>
+ <!-- /TMPL_IF -->
+ <!-- /TMPL_IF -->
<!--/TMPL_LOOP-->
<!-- TMPL_ELSE -->
<p>There are no comments for this item.</p>
<!-- /TMPL_IF -->
-
<!-- TMPL_IF NAME="loggedinusername" -->
- <p> <a href="javascript:Dopop('/cgi-bin/koha/opac-review.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber"-->');">
+ <!-- TMPL_UNLESS NAME="loggedincommenter" -->
+ <div id="addcomment"> <a href="#" onclick="Dopop('/cgi-bin/koha/opac-review.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber"-->'); return false;">
Post or edit your comments on this item.
- </a></p>
+ </a></div>
+ <!-- /TMPL_UNLESS -->
<!-- TMPL_ELSE -->
- <p><a href="/cgi-bin/koha/opac-user.pl">Log in to your account</a> to post a comment.</p>
+ <div id="addcomment"><a href="/cgi-bin/koha/opac-user.pl">Log in to your account</a> to post a comment.</div>
<!-- /TMPL_IF -->
</div>
<!-- /TMPL_IF -->
<h3> </h3>
<form action="/cgi-bin/koha/opac-review.pl" method="post" onsubmit="return closeWindow();">
- <input type="hidden" name="biblionumber" value="<!--TMPL_VAR NAME="biblionumber"-->">
- <input type="hidden" name="type" value="<TMPL_VAR NAME="type">">
+ <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
+ <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
<fieldset class="brief">
<legend>Comments on <i><!--TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" --></i><!-- TMPL_IF NAME="author" -->by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --></legend>
- <ol><li><textarea name="review" cols=60 rows=8><!--TMPL_VAR NAME="review"--></textarea></li></ol>
+ <ol><li><textarea name="review" cols="60" rows="8"><!--TMPL_VAR NAME="review"--></textarea></li></ol>
</fieldset>
<p>Note: Your comment must be approved by a librarian. </p>
- <fieldset class="action"> <input type="submit" value="Submit and close this window" /> <a class="cancel" href="#" onclick="closeWindow(); return false;">Cancel</a></fieldset>
+ <fieldset class="action"> <input type="submit" value="Submit and close this window" /> <a class="cancel close" href="#">Cancel</a></fieldset>
</form>
<script type="text/javascript" language="javascript">
</script>
</div>
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc"-->
+</body>
+</html>
+
);
my $reviews = getreviews( $biblionumber, 1 );
+my $loggedincommenter;
foreach ( @$reviews ) {
my $borrower_number_review = $_->{borrowernumber};
my $borrowerData = GetMember($borrower_number_review,'borrowernumber');
$_->{title} = $borrowerData->{'title'};
$_->{surname} = $borrowerData->{'surname'};
$_->{firstname} = $borrowerData->{'firstname'};
+ $_->{userid} = $borrowerData->{'userid'};
$_->{datereviewed} = format_date($_->{datereviewed});
+ if($borrowerData->{'borrowernumber'} eq $borrowernumber){ $loggedincommenter = 1; }
}
biblionumber => $biblionumber,
subscriptions => \@subs,
subscriptionsnumber => $subscriptionsnumber,
- reviews => $reviews
+ reviews => $reviews,
+ loggedincommenter => $loggedincommenter
);
# XISBN Stuff