* Optional hiding child comments (start) * Changed confirm button in comments hide form * Hide children comments if hide_children was passed * Added a spec for hidden child comment notifications * Hide only explicitly hidden comments * Hide comment modal on article page * Prevent default behaviour for hide comment link * Improved hide comments modal looks * Improved hide comments modal looks * Removed unused code * Send hide comment form via fetch * Hide comment descendants when hide_children was passed * Don't hide hidden comments descendants on permalink * Removed unnecesary span * Improved hide comments modal styling * Removed unused styles and js, improved styling * Clickable label Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com> * Fixed showing hidden comments spoiler for article author * Fixed hideArticleComments.spec.js * Fixed displaying hidden comments text for artice author, added specs * Target hide comments modal inside the modal when adding a listener Co-authored-by: Suzanne Aitchison <suzanne@forem.com> * Replaced hide comment link with a button * Refactored adding hide_children url param Co-authored-by: Suzanne Aitchison <suzanne@forem.com> * Fixed cypress hide comments test * Removed aria-label for submit on the hide comments modal * Fixed formatting Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com> Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
16 lines
832 B
Text
16 lines
832 B
Text
<% if decorated_comment.low_quality %>
|
|
<div class="crayons-notice crayons-notice--warning low-quality-comment-marker">
|
|
<%= t("views.comments.quality.low") %> <a href="/code-of-conduct"><strong><%= t("views.comments.quality.conduct") %></strong></a>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if comment.hidden_by_commentable_user %>
|
|
<div class="low-quality-comment-marker comment__quality-marker <%= should_be_hidden?(comment, @root_comment) ? "element-hidden-by-commentable-user" : "" %>">
|
|
<%= inline_svg_tag("info.svg", aria: true, class: "crayons-icon mr-2", title: t("views.comments.quality.hidden.icon")) %>
|
|
<% if @root_comment %>
|
|
<%= t("views.comments.quality.hidden.text.visible_in_permalink") %>
|
|
<% else %>
|
|
<%= t("views.comments.quality.hidden.text.accessible_via_permalink") %>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|