<div class="comment avatar-container" id="c<%= comment.id %>">
  <div class="author">
    <% if comment.user_id %>
      <h6><%= link_to comment.pretty_author2, { :controller => :user, :action => :show, :id => comment.user_id } %></h6>
    <% else %>
      <h6><%= comment.pretty_author2 %></h6>
    <% end %>
    <span class="date" title="Posted at <%= comment.created_at.strftime('%c') %>">
      <%= link_to t('time.x_ago', :t => time_ago_in_words(comment.created_at)), :controller => "post", :action => "show", :id => comment.post_id, :anchor => ("c#{comment.id}") %>
    </span>
    <% if comment.user and comment.user.has_avatar? then %>
      <div class="comment-avatar-container"> <%= avatar(comment.user, comment.id) %> </div>
    <% end %>
  </div>
  <div class="content">
    <div class="body">
      <% cache [:comment_formatted_body, comment] do %>
        <%= format_inlines(format_text(comment.body, :mode => :comment), comment.id) %>
      <% end %>
    </div>
    <div class="post-footer" style="clear: left;">
      <ul class="flat-list pipe-list">
        <li><a href="#" class="js-comment--quote" data-comment-id="<%= comment.id %>"><%= t('.quote') %></a>
        <% if @current_user.has_permission?(comment) %>
          <li><%= link_to t('.edit'), controller: 'comment', action: 'edit', id: comment.id %>
          <li><a href="#" class="js-comment--destroy" data-comment-id="<%= comment.id %>"><%= t('.delete') %></a>
        <% else %>
          <li><a href="#" class="js-comment--flag" data-comment-id="<%= comment.id %>"><%= t('.flag') %></a>
        <% end %>
      </ul>
    </div>
  </div>
</div>
