39 lines
1.9 KiB
Text
39 lines
1.9 KiB
Text
<% if comment && comment.user %>
|
|
<% if comment.depth < 3 %>
|
|
<details class="comment-wrapper js-comment-wrapper comment-wrapper--deep-<%= comment.depth %>
|
|
<%= comment_class(comment, is_view_root: is_view_root) %>
|
|
<%= should_be_hidden?(comment, @root_comment) ? "details-comment-hidden-by-commentable-user" : "" %>" open>
|
|
<summary aria-label="Toggle this comment (and replies)" data-tracking-name="expand_comment_toggle">
|
|
<span class="<% if comment.depth > 0 %>mx-0<% else %>m:mx-1<% end %> inline-block align-middle">
|
|
<%= crayons_icon_tag(:collapse, class: "expanded", title: t("views.comments.collapse")) %>
|
|
<%= crayons_icon_tag(:expand, class: "collapsed", title: t("views.comments.expand")) %>
|
|
</span>
|
|
<span class="js-collapse-comment-content inline-block align-middle"></span>
|
|
</summary>
|
|
<% end %>
|
|
<div
|
|
id="comment-node-<%= comment.id %>"
|
|
class="
|
|
comment single-comment-node
|
|
<%= "low-quality-comment" if comment.decorate.low_quality %>
|
|
<%= comment_class(comment, is_view_root: is_view_root) %>
|
|
comment--deep-<%= comment.depth %>
|
|
<%= "comment--too-deep" if comment.depth > 3 %>
|
|
"
|
|
data-comment-id="<%= comment.id %>"
|
|
data-path="<%= commentable&.path %>/comments/<%= comment.id_code_generated %>"
|
|
data-comment-author-id="<%= comment_user_id_unless_deleted comment %>"
|
|
data-content-user-id="<%= comment_user_id_unless_deleted comment %>">
|
|
<a name="comment-<%= comment.id_code %>" style="position: absolute; top: -8px;"> </a>
|
|
<%= render("comments/comment_proper",
|
|
comment: comment,
|
|
commentable: commentable,
|
|
is_view_root: is_view_root,
|
|
is_childless: is_childless,
|
|
is_admin: is_admin,
|
|
subtree_html: subtree_html) %>
|
|
</div>
|
|
<% if comment.depth < 3 %>
|
|
</details>
|
|
<% end %>
|
|
<% end %>
|