silverstripe-comments/templates/Includes/CommentsInterface_singlecomment.ss
Dylan Wagstaff 02db1cc86e [SS-2018-015] Update jQuery version, remove entwine from frontend use
jQuery version was extremely old, and was probably stuck at that as a way
of enabling the frivilous use of entwine on the front end for somewhat
trivial ajax submisions. A mild refactor has taken place to leverage newer
jQuery features, and remove outdated dependencies.

Also accompanying this commit are alterations to the markup to make it
more semantically correct (probably not entirely though), and help with
testing the JS functionality of reply forms (when enabled).
2018-05-29 11:40:18 +12:00

45 lines
1.7 KiB
Scheme
Executable File

<% if not $isPreview %>
<p class="info" id="$Permalink">
<% if $URL %>
<a class="author" href="$URL.URL" rel="nofollow">$AuthorName.XML</a>
<% else %>
<span class="author">$AuthorName.XML</span>
<% end_if %>
<span class="date">$Created.Nice ($Created.Ago)</span>
</p>
<% end_if %>
<% if $Gravatar %>
<img class="gravatar" src="$Gravatar.ATT" alt="Gravatar for $Name.ATT" title="Gravatar for $Name.ATT" />
<% end_if %>
<div class="comment-text<% if $Gravatar %> hasGravatar<% end_if %>" id="<% if $isPreview %>comment-preview<% else %>{$Permalink}-text<% end_if %>">
<p>$EscapedComment</p>
</div>
<% if not $isPreview %>
<% if $ApproveLink || $SpamLink || $HamLink || $DeleteLink || $RepliesEnabled %>
<div class="comment-action-links">
<div class="comment-moderation-options">
<% if $ApproveLink %>
<a href="$ApproveLink.ATT" class="approve"><% _t('CommentsInterface_singlecomment_ss.APPROVE', 'approve it') %></a>
<% end_if %>
<% if $SpamLink %>
<a href="$SpamLink.ATT" class="spam"><% _t('CommentsInterface_singlecomment_ss.ISSPAM','spam it') %></a>
<% end_if %>
<% if $HamLink %>
<a href="$HamLink.ATT" class="ham"><% _t('CommentsInterface_singlecomment_ss.ISNTSPAM','not spam') %></a>
<% end_if %>
<% if $DeleteLink %>
<a href="$DeleteLink.ATT" class="delete"><% _t('CommentsInterface_singlecomment_ss.REMCOM','reject it') %></a>
<% end_if %>
</div>
<% if $RepliesEnabled && $canPostComment %>
<button class="comment-reply-link" type="button" aria-controls="$ReplyForm.FormName" aria-expanded="false">
<% _t('CommentsInterface_singlecomment_ss.REPLYTO','Reply to') %> $AuthorName.XML
</button>
<% end_if %>
</div>
<% end_if %>
<% include CommentReplies %>
<% end_if %>