<% 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) %> <%= render "application/update_notice", record: comment %>
<% if CurrentUser.is_member? %> <% if @post || @posts %>
  • <%= link_to "Reply", new_comment_path(id: comment, comment: { post_id: comment.post_id }), class: "reply-link", remote: true %>
  • <% 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.creator_ip_addr %>
  • <% end %> <% end %>
    <% if comment.editable_by?(CurrentUser.user) %> <%= render "comments/form", comment: comment, hidden: true %> <% end %> <% end %>
    <% end %>