<% if CurrentUser.is_moderator? || (params[:search] && params[:search][:is_deleted] =~ /t/) || !comment.is_deleted? %>

<%= link_to_user comment.creator %> <% if comment.is_deleted? %> (deleted) <% end %>

<%= time_ago_in_words_tagged(comment.created_at) %>

<%= format_text(comment.body) %> <% if comment.updated_at - comment.created_at > 5.minutes %>

Updated by <%= link_to_user comment.updater %> <%= time_ago_in_words_tagged(comment.updated_at) %>

<% end %>
<% if CurrentUser.is_member? %> <% if @post || @posts %>
  • <%= link_to "Reply", new_comment_path(:post_id => comment.post_id), :class => "reply-link", "data-comment-id" => comment.id %>
  • <% if comment.editable_by?(CurrentUser.user) %> <% if comment.is_deleted? %>
  • <%= link_to "Undelete", undelete_comment_path(comment.id), :method => :post, :remote => true %>
  • <% else %>
  • <%= link_to "Delete", comment_path(comment.id), :data => {:confirm => "Are you sure you want to delete this comment?"}, :method => :delete, :remote => true %>
  • <% end %>
  • <%= link_to "Edit", edit_comment_path(comment.id), :id => "edit_comment_link_#{comment.id}", :class => "edit_comment_link" %>
  • <% end %> <% if CurrentUser.is_moderator? %>
  • |
  • IP <%= link_to_ip comment.ip_addr %>
  • <% end %> <% end %>
    <% if comment.editable_by?(CurrentUser.user) %> <%= render "comments/form", :post => comment.post, :comment => comment %> <% end %> <% end %>
    <% end %>