From b604b5bb038e4e6f759259d2d28a4720b1fbbac4 Mon Sep 17 00:00:00 2001 From: Ivlev Denis Date: Tue, 13 Mar 2018 12:21:42 +0300 Subject: [PATCH] LIL-33. Hide deactivated comments with childs --- apps/course/templates/course/blocks/comments.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/course/templates/course/blocks/comments.html b/apps/course/templates/course/blocks/comments.html index c762ebc5..b2b74983 100644 --- a/apps/course/templates/course/blocks/comments.html +++ b/apps/course/templates/course/blocks/comments.html @@ -1,5 +1,10 @@ {% load mptt_tags %} {% recursetree object.comments.all %} +{% if not node.deactivated_at %} {% include './comment.html' %} -{{ children }} {% endrecursetree %} \ No newline at end of file +{% if not node.is_leaf_node %} +{{ children }} +{% endif %} +{% endif %} +{% endrecursetree %}