summaryrefslogtreecommitdiff
path: root/app/views/comments/_comment.html.erb
blob: 286cf1bb9545efbee0532089000d2805aa81e8b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<div class="item-group with-avatar comment" id="comment-<%= c.id %>">
  <div class="header <%= "op" if c.author.is?(c.blogpost.author) %>">
    <%= link_to(c.author.avatar(64), c.author, title: c.author.ign) %>
    <%= render partial: "users/username", locals: { user: c.author } %>
    <%= link_to "#comment-#{c.id}" do %>
      <%= ago c.created_at %>
    <% end %>

    <%= link_to "edit", edit_blogpost_comment_path(c.blogpost, c), class: "editlink" if (mod? || c.author.is?(current_user)) %>
    <div class="clear-right"></div>
  </div>
  <div class="items">
    <div class="item content">
      <%= render_md(c.content).html_safe %>
    </div>
  </div>
</div>