From 04b59bef46557f5e7a1230ab8e5a4929b48c5d59 Mon Sep 17 00:00:00 2001 From: CruiseDevice Date: Tue, 21 Apr 2020 22:13:28 +0530 Subject: Improve Post list UI --- yaksh/templates/yaksh/course_forum.html | 66 +++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 24 deletions(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/course_forum.html b/yaksh/templates/yaksh/course_forum.html index 12f5241..ff83c1a 100644 --- a/yaksh/templates/yaksh/course_forum.html +++ b/yaksh/templates/yaksh/course_forum.html @@ -41,30 +41,48 @@

-
- {% if posts %} - {% for post in posts %} -
-
- {{post.title}} -

{{post.description|truncatewords:30}}

-

{{post.get_comments_count}}{% if post.get_comments_count > 1 %} replies{% else %} reply{% endif %}

-
- -
-
- {% endfor %} - {% else %} - No discussion posts are there yet. Create one to start discussing. - {% endif %} -
+ {% if posts %} + + + + + + + + + + + + {% for post in posts %} + + + + + + + + {% endfor %} + +
QuestionsCreated byRepliesLast 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 %} +
+ {% else %} + No discussion posts are there yet. Create one to start discussing. + {% endif %} {% endblock content %} {% block script %} -- cgit