docbrown/app/views/comments/_comment.html.erb
Ben Halpern 7c8f71251d
Add details to toggles and modify some styling (#1484)
* Add details to toggles and modify some styling

* Add details to child comments

* Finalize comment collapse in nested comments

* Modify styling on comment <details>
2019-01-08 12:53:48 -05:00

12 lines
No EOL
593 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 %>