20 lines
976 B
Plaintext
20 lines
976 B
Plaintext
<% if !@page.comments.empty? -%>
|
|
<h3>Comments</h3>
|
|
<ol id="comments" class="comments">
|
|
<% @page.comments.each_with_index do |comment, position| -%>
|
|
<li class="comment" id="comment-<%= comment.id %>">
|
|
<span style="float: right"><% if allowed_to?(:delete_comment, comment) -%><a href="<%= url(:delete_comment, comment) -%>" onclick="if(!confirm('Are you sure you want to delete this comment?')){return false;}" rel="nofollow"><img src="/images/edit-delete.png" /></a><% end -%></span>
|
|
|
|
<div class="author">
|
|
<cite><%= position + 1 -%>. <%= (comment.url.blank? or comment.url !~ /^http/i) ? h(comment.name) : "<a href='#{h(comment.url)}'>#{h(comment.name)}</a>" %></cite>
|
|
<abbr title="<%= comment.created_at %>">said <%= time_lost_in_words comment.page.created_at, comment.created_at %> later:</abbr>
|
|
</div>
|
|
<div class="content">
|
|
<%= h(comment.comment) %>
|
|
</div>
|
|
</li>
|
|
<% end -%>
|
|
</ol>
|
|
<br />
|
|
<% end -%>
|