This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
tuxbliki/app/views/pages/_comments.html.erb

20 lines
954 B
Plaintext
Raw Normal View History

2008-06-27 00:13:15 -04:00
<% 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">
2008-07-26 23:22:56 -04:00
<cite><%= (comment.url.blank? or comment.url !~ /^http/i) ? h(comment.name) : "<a href='#{h(comment.url)}'>#{h(comment.name)}</a>" %></cite>
2008-06-27 00:13:15 -04:00
<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 />
2008-07-03 02:26:54 -04:00
<% end -%>