Files
nairobi/app/views/comments/_actions.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

16 lines
601 B
Plaintext

<span class="js-flag-actions">
<%= render "shared/flag_actions", flaggable: comment, divider: true %>
</span>
<% if can?(:hide, comment) || can?(:hide, comment.user) %>
<% if comment.author == current_user %>
<span class="divider">&nbsp;&bull;&nbsp;</span>
<%= 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 %>
<%= render Shared::ModerationActionsComponent.new(comment) %>
<% end %>
<% end %>