silverstripe-comments/templates/CommentsInterface_singlecomment.ss
Will Rossiter 3a4a1dd4b4 FIX Ensure comments are escaped in RSS feeds.
FIX Also fix up preview to only output the comment content rather than the whole template.

FIX Hide preview after posting comment.

API Move AllowHtml to field to prevent issues with altering Html configuration after comments have been posted.

FIX If moderation is turned on for commenting, still render comments in preview mode.
2013-03-05 22:01:42 +13:00

31 lines
1.1 KiB
Scheme
Executable File

<div class="comment" id="<% if isPreview %>comment-preview<% else %>$Permalink<% end_if %>">
$EscapedComment
</div>
<% if not isPreview %>
<p class="info">
<% if $URL %>
<% _t('PBY','Posted by') %> <a href="$URL.URL" rel="nofollow">$AuthorName.XML</a>, $Created.Nice ($Created.Ago)
<% else %>
<% _t('PBY','Posted by') %> $AuthorName.XML, $Created.Nice ($Created.Ago)
<% end_if %>
</p>
<% if $ApproveLink || $SpamLink || $HamLink || $DeleteLink %>
<ul class="action-links">
<% if ApproveLink %>
<li><a href="$ApproveLink.ATT" class="approve"><% _t('APPROVE', 'approve this comment') %></a></li>
<% end_if %>
<% if SpamLink %>
<li><a href="$SpamLink.ATT" class="spam"><% _t('ISSPAM','this comment is spam') %></a></li>
<% end_if %>
<% if HamLink %>
<li><a href="$HamLink.ATT" class="ham"><% _t('ISNTSPAM','this comment is not spam') %></a></li>
<% end_if %>
<% if DeleteLink %>
<li class="last"><a href="$DeleteLink.ATT" class="delete"><% _t('REMCOM','remove this comment') %></a></li>
<% end_if %>
</ul>
<% end_if %>
<% end_if %>