Files
nairobi/app/views/comments/_actions.html.erb
2021-04-13 20:04:04 +02:00

25 lines
1.0 KiB
Plaintext

<span class="js-flag-actions">
<%= render "shared/flag_actions", flaggable: comment, divider: true %>
</span>
<span class="js-moderation-actions">
<% if can? :hide, comment %>
<span class="divider">&nbsp;&bull;&nbsp;</span>
<% if comment.author == current_user %>
<%= link_to t("comments.actions.delete"),
hide_comment_path(comment),
method: :put, remote: true, class: "delete-comment",
data: { confirm: t("comments.actions.confirm_delete") } %>
<% else %>
<%= link_to t("admin.actions.hide").capitalize, hide_moderation_comment_path(comment),
method: :put, remote: true, data: { confirm: t("admin.actions.confirm") } %>
<% end %>
<% end %>
<% if can? :hide, comment.user %>
<span class="divider">&nbsp;&bull;&nbsp;</span>
<%= link_to t("admin.actions.hide_author").capitalize, hide_moderation_user_path(comment.user_id),
method: :put, data: { confirm: t("admin.actions.confirm") } %>
<% end %>
</span>