2017-02-13 18:08:51 -06:00
|
|
|
<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>
|
2017-02-24 16:05:10 -06:00
|
|
|
<% else %>
|
|
|
|
<div class="comment-edit-stamp"><%= time_ago_in_words(comment.created_at) %> ago</div>
|
2017-02-13 18:08:51 -06:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
2017-02-10 15:46:43 -06:00
|
|
|
<div class="comment-author"><%= comment.user.name %></div>
|
2017-02-13 18:08:51 -06:00
|
|
|
|
|
|
|
|
|
|
|
<% 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 %>
|