[% USE scalar %]
<hr>
<h4>Comments ([% Post.scalar.comments.count %])</h4>
[% FOREACH child IN Post.scalar.direct_comments.all %]
[% INCLUDE private/comment.html comment = child %]
[% END %]
<hr>
<div id="add-comment">
[% IF User.can_comment %]
<h3>Add comment:</h3>
<form action="[% remote_action_path %]/comment/add" method="post">
<input name="post_id" type="hidden" value="[% Post.id %]" />
<textarea name="body" style="width:100%;height: 150px;"></textarea>
<button class="btn btn-primary" type="submit">Comment</button>
</form>
[% ELSE %]
<h3><a href="[% mount_url %]/auth/to_referer?_fragment=add-comment">Sign in</a> to add comment</h3>
[% END %]
</div>
<br><br>