44 lines
1.3 KiB
Plaintext
44 lines
1.3 KiB
Plaintext
<div class="row">
|
|
<div id="<%= dom_id(comment) %>" class="comment small-12 column">
|
|
|
|
<% if comment.hidden? %>
|
|
<%= t("debates.comment.deleted") %>
|
|
<% else %>
|
|
|
|
<%= avatar_image(comment.user, size: 32, class: 'left') %>
|
|
|
|
<div class="comment-body">
|
|
<span class="comment-info">
|
|
<span><%= comment.user.name %></span> • <%= time_ago_in_words(comment.created_at) %>
|
|
</span>
|
|
<p><%= comment.body %></p>
|
|
|
|
<span id="<%= dom_id(comment) %>_votes" class="comment-votes right">
|
|
<%= render 'comments/votes', comment: comment %>
|
|
</span>
|
|
|
|
<p class="reply">
|
|
<%= t("debates.comment.responses", count: comment.children_count) %>
|
|
|
|
<% if user_signed_in? %>
|
|
|
|
|
<%= link_to(comment_link_text(comment), "",
|
|
class: "js-add-comment-link", data: {'id': dom_id(comment)}) %>
|
|
|
|
<% if moderator? %>
|
|
<%= render 'comments/actions', comment: comment %>
|
|
<% end %>
|
|
|
|
<%= render 'comments/form', {parent: comment, toggeable: true} %>
|
|
<% end %>
|
|
</p>
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<div class="comment-children">
|
|
<%= render comment.children.with_deleted.reorder('id DESC, lft') %>
|
|
</div>
|
|
|
|
</div>
|
|
</div> |