Files
nairobi/app/components/shared/moderation_actions_component.html.erb
Javi Martín 021fef07b6 Make action names to block and hide more clear
The `hide` action was calling the `block` method while the `soft_block`
action was calling the `hide` method.

Combined with the fact that we also have a `block` permission which is
used in `ModerateActions` the logic was hard to follow.
2021-12-30 15:50:03 +01:00

13 lines
490 B
Plaintext

<span class="moderation-actions">
<% if can? :hide, record %>
<%= link_to t("admin.actions.hide").capitalize, hide_path,
method: :put, remote: true, data: { confirm: confirm_hide_text } %>
<% end %>
<% if can? :hide, record.author %>
<%= raw separator %>
<%= link_to t("admin.actions.block_author").capitalize, block_moderation_user_path(record.author_id),
method: :put, data: { confirm: confirm_block_author_text } %>
<% end %>
</span>