From 2a9f81cb32acfd7a2efc18f58c4529b39ce4061b Mon Sep 17 00:00:00 2001 From: CruiseDevice Date: Sat, 11 Apr 2020 17:45:31 +0530 Subject: Discussion forum for a course --- yaksh/templates/yaksh/course_forum.html | 68 ++++++++++++++++++++++++++++++ yaksh/templates/yaksh/course_modules.html | 1 + yaksh/templates/yaksh/thread_comments.html | 46 ++++++++++++++++++++ 3 files changed, 115 insertions(+) create mode 100644 yaksh/templates/yaksh/course_forum.html create mode 100644 yaksh/templates/yaksh/thread_comments.html (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/course_forum.html b/yaksh/templates/yaksh/course_forum.html new file mode 100644 index 0000000..b0c7024 --- /dev/null +++ b/yaksh/templates/yaksh/course_forum.html @@ -0,0 +1,68 @@ +{% extends "user.html" %} +{% load humanize %} +{% block title %} + {{course.name}}: Discussion Forum +{% endblock title %} +{% block content %} +
{{thread.get_comments_count}}{% if thread.get_comments_count > 1 %} replies{% else %} reply{% endif %}
+{{thread.description}}
+{{comment.body}}
+ by: {{comment.user.username}} . {{comment.created_at}} +{{thread.get_comments_count}}{% if thread.get_comments_count > 1 %} replies{% else %} reply{% endif %}
{{comment.body}}
+ {% if comment.image %} + + + + {% endif %} +{{comment.description}}
by: {{comment.user.username}} . {{comment.created_at}}{{thread.description}}
@@ -29,7 +34,10 @@ {% endif %}{{comment.description}}
- by: {{comment.user.username}} . {{comment.created_at}} + + by: {{comment.creator.username}} . {{comment.created_at}} + {% if user.profile.is_moderator %}Delete{% endif %} +{{post.description}}
+ + + +{{comment.description}}
+ + by: {{comment.creator.username}} . {{comment.created_at}} + {% if user.profile.is_moderator %}Delete{% endif %} + +{{thread.description}}
-{{comment.description}}
- - by: {{comment.creator.username}} . {{comment.created_at}} - {% if user.profile.is_moderator %}Delete{% endif %} - -{{post.get_comments_count}}{% if post.get_comments_count > 1 %} replies{% else %} reply{% endif %}
{{comment.description}}
-- cgit From eb9f6cb240268735e08ebc2a6d26d88c7e5097f7 Mon Sep 17 00:00:00 2001 From: CruiseDevice Date: Wed, 15 Apr 2020 22:15:53 +0530 Subject: Improve UI slightly --- yaksh/templates/yaksh/course_forum.html | 4 +--- yaksh/templates/yaksh/post_comments.html | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/course_forum.html b/yaksh/templates/yaksh/course_forum.html index 3e4d07b..ef6dbf8 100644 --- a/yaksh/templates/yaksh/course_forum.html +++ b/yaksh/templates/yaksh/course_forum.html @@ -52,9 +52,7 @@{{post.description|truncatewords:30}}
{{post.get_comments_count}}{% if post.get_comments_count > 1 %} replies{% else %} reply{% endif %}
{{post.description}}
+{{comment.description}}
+{{post.description|truncatewords:30}}
-{{post.get_comments_count}}{% if post.get_comments_count > 1 %} replies{% else %} reply{% endif %}
-Questions | +Created by | +Replies | +Last reply | ++ |
---|---|---|---|---|
+ {{post.title}} + {{ post.description|truncatewords:30 }} + Last updated: {{post.modified_at}} + | +{{post.creator.username}} | +{{post.get_comments_count}} | ++ {% with post.get_last_comment as last_comment %} + {% if last_comment %} + {{last_comment.creator}} + {% else %} + None + {% endif %} + {% endwith %} + | ++ {% if user.profile.is_moderator %} + Delete + {% endif %} + | +
{{comment.description}}
+{{comment.description}}
-{{comment.description}}
@@ -57,7 +56,7 @@ {% endif %}