docbrown/app/views/comments/_comment_proper.html.erb
Arit Amana 04d5ea8e82
Update the UI for Low-Quality-Comments Notice (#12952)
* Implement change for regular comments

* Modify tests and implement for deleted-commentable-comment

* Fix stupid mistake
2021-03-16 09:40:29 -04:00

46 lines
1.3 KiB
Text

<% decorated_comment = comment.decorate %>
<div class="comment__inner">
<%= render partial: "comments/comment_avatar", locals: { comment: comment } %>
<div class="inner-comment comment__details">
<div class="comment__content crayons-card">
<% if comment.deleted %>
<div class="p-6 align-center opacity-50 fs-s">
<span class="js-comment-username">Comment deleted</span>
</div>
<% else %>
<%= render partial: "comments/comment_quality_marker", locals: {
comment: comment,
decorated_comment: decorated_comment
} %>
<%= render partial: "comments/comment_header", locals: {
comment: comment,
commentable: commentable,
decorated_comment: decorated_comment
} %>
<div
class="
comment__body
text-styles
text-styles--secondary
body
<%= "color-base-60" if comment.decorate.low_quality %>
">
<%= comment.safe_processed_html %>
</div>
<% end %>
</div>
<%= unless comment.deleted
(render partial: "comments/comment_footer", locals: {
comment: comment,
commentable: commentable,
is_childless: is_childless
})
end %>
</div>
</div>
<%= subtree_html %>