docbrown/app/views/comments/_comment.html.erb

20 lines
684 B
Text

<% if comment && comment.user %>
<% if comment.depth < 3 %>
<details open>
<summary><span>&nbsp;</span></summary>
<%= render("comments/comment_proper",
comment: comment,
commentable: commentable,
is_view_root: is_view_root,
is_childless: is_childless,
subtree_html: subtree_html) %>
</details>
<% else %>
<%= render("comments/comment_proper",
comment: comment,
commentable: commentable,
is_view_root: is_view_root,
is_childless: is_childless,
subtree_html: subtree_html) %>
<% end %>
<% end %>