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

21 lines
563 B
Plaintext

<div>
<%= comment.message %>
<% if policy(comment).update? %>
<label class="" for="comment-<%= comment.id %>">edit</label>
<% end %>
<% if comment.edits? %>
<div>Updated <%= local_time_ago(comment.updated_at) %></div>
<% else %>
<div><%= local_time_ago(comment.created_at) %></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 %>