In the moderation section there's no clear indicator as to what the "Hide" and "Block" buttons do and the difference between them. Since we're using confirmation dialogs in all moderation actions except these ones, we're adding them here as well, so the difference will appear in the dialog. This isn't a very good solution, though, since the confirmation dialog comes after clicking the button and users have already been wondering whether clicking that button will be the right choice. A better solution would be making the purpose clear before the button is clicked, although that's something we don't do anywhere in the admin/moderation sections.
24 lines
584 B
Plaintext
24 lines
584 B
Plaintext
<div class="moderation-actions">
|
|
<% if can? :hide, record %>
|
|
<%= render Admin::ActionComponent.new(
|
|
:hide,
|
|
record,
|
|
path: hide_path,
|
|
method: :put,
|
|
remote: true,
|
|
confirm: true
|
|
) %>
|
|
<% end %>
|
|
|
|
<% if can? :hide, author %>
|
|
<%= render Admin::ActionComponent.new(
|
|
:block_author,
|
|
author,
|
|
path: block_moderation_user_path(author),
|
|
id: dom_id(author, "#{dom_id(record)}_block_author"),
|
|
method: :put,
|
|
confirm: ->(name) { t("moderation.users.index.confirm_block", name: name) }
|
|
) %>
|
|
<% end %>
|
|
</div>
|