skill-assessment-app/app/views/admin/result/_comment.html.erb
Mark Moser eb6a98443c added comment timestamps
completes #103
2017-02-24 16:05:18 -06:00

24 lines
740 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>
<% else %>
<div class="comment-edit-stamp"><%= time_ago_in_words(comment.created_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 %>