silverstripe-comments/templates/CommentsInterface.ss

54 lines
2.3 KiB
Scheme
Raw Normal View History

<% require themedCSS('comments', 'comments') %>
<% if $CommentsEnabled %>
<div id="$CommentHolderID" class="comments-holder-container">
2013-07-08 12:08:02 +02:00
<h4><% _t('CommentsInterface_ss.POSTCOM','Post your comment') %></h4>
<% if $AddCommentForm %>
<% if $canPostComment %>
<% if $ModeratedSubmitted %>
<p id="moderated" class="message good"><% _t('CommentsInterface_ss.AWAITINGMODERATION', 'Your comment has been submitted and is now awaiting moderation.') %></p>
<% end_if %>
$AddCommentForm
<% else %>
<p><% _t('CommentsInterface_ss.COMMENTLOGINERROR', 'You cannot post comments until you have logged in') %><% if $PostingRequiredPermission %>, <% _t('CommentsInterface_ss.COMMENTPERMISSIONERROR', 'and have an appropriate permission level') %><% end_if %>.
2013-07-08 12:08:02 +02:00
<a href="Security/login?BackURL={$Parent.Link}" title="<% _t('CommentsInterface_ss.LOGINTOPOSTCOMMENT', 'Login to post a comment') %>"><% _t('CommentsInterface_ss.COMMENTPOSTLOGIN', 'Login Here') %></a>.
</p>
<% end_if %>
<% else %>
<p><% _t('CommentsInterface_ss.COMMENTSDISABLED', 'Posting comments has been disabled') %>.</p>
<% end_if %>
2013-07-08 12:08:02 +02:00
<h4><% _t('CommentsInterface_ss.COMMENTS','Comments') %></h4>
<div class="comments-holder">
2015-04-13 05:41:18 +02:00
<% if $PagedComments %>
<ul class="comments-list root-level">
2015-04-13 05:41:18 +02:00
<% loop $PagedComments %>
<li class="comment $EvenOdd<% if FirstLast %> $FirstLast <% end_if %> $SpamClass">
<% include CommentsInterface_singlecomment %>
</li>
2012-07-22 03:44:30 +02:00
<% end_loop %>
</ul>
2015-04-13 05:41:18 +02:00
<% with $PagedComments %>
<% include CommentPagination %>
<% end_with %>
<% end_if %>
2015-04-13 05:41:18 +02:00
<p class="no-comments-yet"<% if $PagedComments.Count %> style='display: none' <% end_if %> ><% _t('CommentsInterface_ss.NOCOMMENTSYET','No one has commented on this page yet.') %></p>
</div>
<% if $DeleteAllLink %>
<p class="delete-comments">
2015-05-19 22:55:16 +02:00
<a href="$DeleteAllLink"><% _t('CommentsInterface_ss.DELETEALLCOMMENTS','Delete all comments on this page') %></a>
</p>
<% end_if %>
<p class="commenting-rss-feed">
<a href="$CommentRSSLinkPage"><% _t('CommentsInterface_ss.RSSFEEDCOMMENTS', 'RSS feed for comments on this page') %></a> |
<a href="$CommentRSSLink"><% _t('CommentsInterface_ss.RSSFEEDALLCOMMENTS', 'RSS feed for all comments') %></a>
</p>
</div>
<% end_if %>