Files
nairobi/app/components/shared/moderation_actions_component.html.erb
Javi Martín 3b2b09be2b Use CSS to show separators in moderation actions
This is useful for people using screen readers, since the character used
as a separator won't be read aloud.

Since many screen readers also read content generated via CSS
pseudoelements, we aren't using `content: "|";` or similar but using
elements with a very small width instead.
2021-12-30 15:50:03 +01:00

24 lines
522 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: true
) %>
<% end %>
</div>