<li><a href='javascript:add_rating(5)' title='5 stars out of 5' class='five-stars'>5</a></li>
</ul>
</span>
+ [% IF photo.rated > 0%]
([%photo.approx_rating%] out of [%photo.rated%] votes)
+ [% END %]
</p>
<script>
add_rating = function (rank) {
[% END %]
<div class="comment">
<form action="javascript:post_comment()" method="post">
- Name: <input id="commentname" name="name" /> <hr>
+ [% IF request.user %]
+ <input id="commentname" name="name" type="hidden" value="[% request.user |html %]"/>
+ [% ELSE %]
+ Name: <input id="commentname" name="name" />
+ <hr>
+ [% END %]
<textarea id="newcomment" name="content" cols="60" rows="5"/></textarea>
<p>
<input type="submit" name="Comment on this picture" value="Comment on this picture">