mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
BUGFIX: Add Layout folder and move templates to it
This commit is contained in:
parent
a5e7f0a002
commit
f3732fa946
73
templates/Layout/CommentsInterface.ss
Executable file
73
templates/Layout/CommentsInterface.ss
Executable file
@ -0,0 +1,73 @@
|
||||
<% if CommentsEnabled %>
|
||||
<div id="$CommentHolderID" class="comments-holder-container">
|
||||
<h4><% _t('CommentsInterface_ss.POSTCOM','Post your comment') %></h4>
|
||||
|
||||
<% if AddCommentForm %>
|
||||
<% if CanPost %>
|
||||
<% if ModeratedSubmitted %>
|
||||
<p id="$CommentHolderID_PostCommentForm_error" 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 PostingRequiresPermission %>,<% _t('CommentsInterface_ss.COMMENTPERMISSIONERROR', 'and that you have an appropriate permission level') %><% end_if %>.
|
||||
<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 %>
|
||||
|
||||
<h4><% _t('CommentsInterface_ss.COMMENTS','Comments') %></h4>
|
||||
|
||||
<div class="comments-holder">
|
||||
<% if Comments %>
|
||||
<ul class="comments-list">
|
||||
<% loop Comments %>
|
||||
<li class="comment $EvenOdd<% if FirstLast %> $FirstLast <% end_if %> $SpamClass">
|
||||
<% include CommentsInterface_singlecomment %>
|
||||
</li>
|
||||
<% end_loop %>
|
||||
</ul>
|
||||
|
||||
<% if Comments.MoreThanOnePage %>
|
||||
<div class="comments-pagination">
|
||||
<p>
|
||||
<% if Comments.PrevLink %>
|
||||
<a href="$Comments.PrevLink" class="previous">« <% _t('CommentsInterface_ss.PREV','previous') %></a>
|
||||
<% end_if %>
|
||||
|
||||
<% if Comments.Pages %>
|
||||
<% loop Comments.Pages %>
|
||||
<% if CurrentBool %>
|
||||
<strong>$PageNum</strong>
|
||||
<% else %>
|
||||
<a href="$Link">$PageNum</a>
|
||||
<% end_if %>
|
||||
<% end_loop %>
|
||||
<% end_if %>
|
||||
|
||||
<% if Comments.NextLink %>
|
||||
<a href="$Comments.NextLink" class="next"><% _t('CommentsInterface_ss.NEXT','next') %> »</a>
|
||||
<% end_if %>
|
||||
</p>
|
||||
</div>
|
||||
<% end_if %>
|
||||
<% end_if %>
|
||||
|
||||
<p class="no-comments-yet"<% if $Comments.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">
|
||||
<a href="$DeleteAllLink"><% _t('CommentsInterface_ss.PageCommentInterface.DELETEALLCOMMENTS','Delete all comments on this page') %></a>
|
||||
</p>
|
||||
<% end_if %>
|
||||
|
||||
<p class="commenting-rss-feed">
|
||||
<a href="$RssLinkPage"><% _t('CommentsInterface_ss.RSSFEEDCOMMENTS', 'RSS feed for comments on this page') %></a> |
|
||||
<a href="$RssLink"><% _t('CommentsInterface_ss.RSSFEEDALLCOMMENTS', 'RSS feed for all comments') %></a>
|
||||
</p>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
3
templates/Layout/CommentsInterface_pendingcomment.ss
Normal file
3
templates/Layout/CommentsInterface_pendingcomment.ss
Normal file
@ -0,0 +1,3 @@
|
||||
<div class="pending-comment">
|
||||
<p><% _t('CommentsInterface_pendingcomment_ss.AWAITINGMODERATION', 'Your comment has been submitted and is now awaiting moderation.') %></p>
|
||||
</div>
|
31
templates/Layout/CommentsInterface_singlecomment.ss
Executable file
31
templates/Layout/CommentsInterface_singlecomment.ss
Executable file
@ -0,0 +1,31 @@
|
||||
<div class="comment" id="<% if isPreview %>comment-preview<% else %>$Permalink<% end_if %>">
|
||||
<% if $Gravatar %><img class="gravatar" src="$Gravatar" alt="Gravatar for $Name" title="Gravatar for $Name" /><% end_if %>
|
||||
$EscapedComment
|
||||
</div>
|
||||
|
||||
<% if not isPreview %>
|
||||
<p class="info">
|
||||
<% if $URL %>
|
||||
<% _t('CommentsInterface_singlecomment_ss.PBY','Posted by') %> <a href="$URL.URL" rel="nofollow">$AuthorName.XML</a>, $Created.Nice ($Created.Ago)
|
||||
<% else %>
|
||||
<% _t('CommentsInterface_singlecomment_ss.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('CommentsInterface_singlecomment_ss.APPROVE', 'approve this comment') %></a></li>
|
||||
<% end_if %>
|
||||
<% if SpamLink %>
|
||||
<li><a href="$SpamLink.ATT" class="spam"><% _t('CommentsInterface_singlecomment_ss.ISSPAM','this comment is spam') %></a></li>
|
||||
<% end_if %>
|
||||
<% if HamLink %>
|
||||
<li><a href="$HamLink.ATT" class="ham"><% _t('CommentsInterface_singlecomment_ss.ISNTSPAM','this comment is not spam') %></a></li>
|
||||
<% end_if %>
|
||||
<% if DeleteLink %>
|
||||
<li class="last"><a href="$DeleteLink.ATT" class="delete"><% _t('CommentsInterface_singlecomment_ss.REMCOM','remove this comment') %></a></li>
|
||||
<% end_if %>
|
||||
</ul>
|
||||
<% end_if %>
|
||||
<% end_if %>
|
Loading…
Reference in New Issue
Block a user