57 lines
2.1 KiB
Plaintext
57 lines
2.1 KiB
Plaintext
<h2><%= t("moderation.comments.index.title") %></h2>
|
|
|
|
<dl class="sub-nav">
|
|
<dt><%= t("moderation.comments.index.filter") %>:</dt>
|
|
|
|
<% @valid_filters.each do |filter| %>
|
|
<% if @filter == filter %>
|
|
<dd class="active"><%= t("moderation.comments.index.filters.#{filter}") %></dd>
|
|
<% else %>
|
|
<dd><%= link_to t("moderation.comments.index.filters.#{filter}"),
|
|
moderation_comments_path(filter: filter) %></dd>
|
|
<% end %>
|
|
<% end %>
|
|
</dl>
|
|
|
|
<h3><%= page_entries_info @comments %></h3>
|
|
|
|
<table>
|
|
<tr>
|
|
<th>
|
|
<%= t("moderation.comments.index.headers.commentable") %> |
|
|
<%= t("moderation.comments.index.headers.commentable_type") %> |
|
|
<%= t("moderation.comments.index.headers.updated_at") %>
|
|
</th>
|
|
<th><%= t("moderation.comments.index.headers.comment") %></th>
|
|
<th class="text-center"><%= t("moderation.comments.index.headers.flags") %></th>
|
|
<th class="text-center" colspan="2"><%= t("moderation.debates.index.headers.actions") %></th>
|
|
</tr>
|
|
<% @comments.each do |comment| %>
|
|
<tr id="comment_<%= comment.id %>">
|
|
<td>
|
|
<%= link_to comment.commentable.title, comment.commentable %>
|
|
<br>
|
|
<%= comment.commentable_type.constantize.model_name.human %>
|
|
<span class="date"><%= l comment.updated_at.to_date %></span>
|
|
</td>
|
|
<td><%= comment.body %></td>
|
|
<td class="text-center"><%= comment.inappropiate_flags_count %></td>
|
|
<td>
|
|
<%= link_to t("moderation.comments.index.hide"), hide_in_moderation_screen_moderation_comment_path(comment, request.query_parameters), method: :put, class: "delete" %>
|
|
</td>
|
|
<% if can? :mark_as_reviewed, comment %>
|
|
<td>
|
|
<%= link_to t("moderation.comments.index.archive"), mark_as_reviewed_moderation_comment_path(comment, request.query_parameters), method: :put, class: "button radius tiny warning" %>
|
|
</td>
|
|
<% end %>
|
|
<% if comment.reviewed? %>
|
|
<td class="archived">
|
|
<%= t("moderation.comments.index.archived") %>
|
|
</td>
|
|
<% end %>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|
|
|
|
<%= paginate @comments %>
|