skill-assessment-app/app/views/admin/result/_comment.html.erb
2017-06-05 11:30:34 -05:00

21 lines
577 B
Plaintext

<div>
<%= comment.message %>
<% if policy(comment).update? %>
<label class="" for="comment-<%= comment.id %>">edit</label>
<% end %>
<% if comment.edits? %>
<div>Updated <%= time_ago_in_words(comment.updated_at) %> ago</div>
<% else %>
<div><%= time_ago_in_words(comment.created_at) %> ago</div>
<% end %>
</div>
<div><%= comment.user.name %></div>
<% if policy(comment).update? %>
<input type="checkbox" id="comment-<%= comment.id %>">
<%= render partial: 'comment_form', locals: {comment: comment, test_hash: comment.test_hash } %>
<% end %>