Files
grecia/app/views/moderation/comments/index.html.erb

39 lines
1.3 KiB
Plaintext

<h2><%= t('moderation.comments.index.title') %></h2>
<h3><%= page_entries_info @comments %></h3>
<table>
<tr>
<th><%= t('moderation.comments.index.flags') %></th>
<th><%= t('moderation.comments.index.updated_at') %></th>
<th><%= t('moderation.comments.index.commentable_type') %></th>
<th><%= t('moderation.comments.index.commentable') %></th>
<th><%= t('moderation.comments.index.comment') %></th>
</tr>
<% @comments.each do |comment| %>
<tr id="comment_<%= comment.id %>">
<td><%= comment.inappropiate_flags_count %></td>
<td><%= l comment.updated_at.to_date %></td>
<td><%= comment.commentable_type.constantize.model_name.human %></td>
<td><%= link_to comment.commentable.title, comment.commentable %></td>
<td><%= comment.body %></td>
<td>
<%= link_to t('moderation.comments.index.hide'), hide_in_moderation_screen_moderation_comment_path(comment), method: :put %>
</td>
<% if can? :mark_as_reviewed, comment %>
<td>
<%= link_to t('moderation.comments.index.mark_as_reviewed'), mark_as_reviewed_moderation_comment_path(comment), method: :put %>
</td>
<% end %>
<% if comment.reviewed? %>
<td>
<%= t('moderation.comments.index.reviewed') %>
</td>
<% end %>
</tr>
<% end %>
</table>
<%= paginate @comments %>