summaryrefslogtreecommitdiff
path: root/app/views/comments/_comment.html.erb
blob: 147e85b7740f4ce842e3e9f7caf5d02c234b5fb3 (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? && current_user.role >= c.author.role) || 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>