Files
grecia/app/views/admin/comments/index.html.erb
2016-06-16 13:44:06 +02:00

36 lines
1.2 KiB
Plaintext

<h2><%= t("admin.comments.index.title") %></h2>
<%= render 'shared/filter_subnav', i18n_namespace: "admin.comments.index" %>
<h3><%= page_entries_info @comments %></h3>
<table>
<% @comments.each do |comment| %>
<tr id="<%= dom_id(comment) %>">
<td>
<%= text_with_links comment.body %><br>
<% if comment.commentable.hidden? %>
(<%= t("admin.comments.index.hidden_#{comment.commentable_type.downcase}") %>: <%= comment.commentable.title %>)
<% else %>
<%= link_to comment.commentable.title, comment.commentable %>
<% end %>
</td>
<td class="text-right">
<%= link_to t("admin.actions.restore"),
restore_admin_comment_path(comment, request.query_parameters),
method: :put,
data: { confirm: t("admin.actions.confirm") },
class: "button hollow on-hover-block" %>
<% unless comment.confirmed_hide? %>
<%= link_to t("admin.actions.confirm_hide"),
confirm_hide_admin_comment_path(comment, request.query_parameters),
method: :put,
class: "button hollow warning on-hover-block" %>
<% end %>
</td>
</tr>
<% end %>
</table>
<%= paginate @comments %>