diff --git a/apps/course/templates/course/blocks/comments.html b/apps/course/templates/course/blocks/comments.html new file mode 100644 index 00000000..253c501b --- /dev/null +++ b/apps/course/templates/course/blocks/comments.html @@ -0,0 +1,30 @@ +{% load static %} +{% load mptt_tags %} + +{% recursetree course.comments.all %} + +
+ {% if node.author.photo %} +
+ +
+ {% else %} +
+ +
+ {% endif %} +
+
+
+ {{ node.author.get_full_name }} + {{ node.created_at_humanize }} +
+
{{ node.content }}
+
+
+ +
+
+
+ +{{ children }} {% endrecursetree %} \ No newline at end of file diff --git a/apps/course/templates/course/course.html b/apps/course/templates/course/course.html index fc847874..bea78606 100644 --- a/apps/course/templates/course/course.html +++ b/apps/course/templates/course/course.html @@ -1,6 +1,5 @@ {% extends "templates/lilcity/index.html" %} {% load static %} -{% load mptt_tags %} {% block content %}
@@ -201,38 +200,7 @@
- {% recursetree course.comments.all %} - -
- {% if node.author.photo %} -
- {% else %} -
- {% endif %} -
-
-
{{ node.author.get_full_name }}{{ node.created_at_humanize }}
-
{{ node.content }}
-
-
-
-
- - {% if not node.is_leaf_node %} - {{ children }} - {% endif %} - {% endrecursetree %} - - + {% include "./blocks/comments.html" with course=course %}