From 5e7057252dd07614320d1ce3560b7857eef0a678 Mon Sep 17 00:00:00 2001 From: Ivlev Denis Date: Tue, 30 Jan 2018 13:39:38 +0300 Subject: [PATCH] Split comments template --- .../templates/course/blocks/comment.html | 25 +++++++++++++++++ .../templates/course/blocks/comments.html | 27 +------------------ 2 files changed, 26 insertions(+), 26 deletions(-) create mode 100644 apps/course/templates/course/blocks/comment.html diff --git a/apps/course/templates/course/blocks/comment.html b/apps/course/templates/course/blocks/comment.html new file mode 100644 index 00000000..cbb199f4 --- /dev/null +++ b/apps/course/templates/course/blocks/comment.html @@ -0,0 +1,25 @@ +{% load static %} + +
+ {% if node.author.photo %} +
+ +
+ {% else %} +
+ +
+ {% endif %} +
+
+
+ {{ node.author.get_full_name }} + {{ node.created_at_humanize }} +
+
{{ node.content }}
+
+
+ +
+
+
\ No newline at end of file diff --git a/apps/course/templates/course/blocks/comments.html b/apps/course/templates/course/blocks/comments.html index 55e7f615..c762ebc5 100644 --- a/apps/course/templates/course/blocks/comments.html +++ b/apps/course/templates/course/blocks/comments.html @@ -1,30 +1,5 @@ -{% load static %} {% load mptt_tags %} {% recursetree object.comments.all %} - -
- {% if node.author.photo %} -
- -
- {% else %} -
- -
- {% endif %} -
-
-
- {{ node.author.get_full_name }} - {{ node.created_at_humanize }} -
-
{{ node.content }}
-
-
- -
-
-
- +{% include './comment.html' %} {{ children }} {% endrecursetree %} \ No newline at end of file