22 lines
636 B
Plaintext
22 lines
636 B
Plaintext
<div class="comment-message">
|
|
<%= comment.message %>
|
|
|
|
<% if policy(comment).update? %>
|
|
<label class="comment-edit-btn" for="comment-<%= comment.id %>">edit</label>
|
|
<% end %>
|
|
|
|
<% if comment.edits? %>
|
|
<div class="comment-edit-stamp">Updated <%= time_ago_in_words(comment.updated_at) %> ago</div>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="comment-author"><%= comment.user.name %></div>
|
|
|
|
|
|
<% if policy(comment).update? %>
|
|
<input type="checkbox" id="comment-<%= comment.id %>">
|
|
<div class="comment-edit-form">
|
|
<%= render partial: 'comment_form', locals: {comment: comment, test_hash: comment.test_hash } %>
|
|
</div>
|
|
<% end %>
|