diff options
author | CruiseDevice | 2020-04-13 17:27:49 +0530 |
---|---|---|
committer | CruiseDevice | 2020-04-13 17:27:49 +0530 |
commit | 2f9331717075b34534f2745706f57a98f7dce20d (patch) | |
tree | e942155f11e47299d7deb5447267c0055e49d4de /yaksh/templates | |
parent | 0e6c7d589114450d5cd1bc581ee1692c235f1a73 (diff) | |
download | online_test-2f9331717075b34534f2745706f57a98f7dce20d.tar.gz online_test-2f9331717075b34534f2745706f57a98f7dce20d.tar.bz2 online_test-2f9331717075b34534f2745706f57a98f7dce20d.zip |
Add feature to hide thread or comments
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/course_forum.html | 4 | ||||
-rw-r--r-- | yaksh/templates/yaksh/thread_comments.html | 12 |
2 files changed, 13 insertions, 3 deletions
diff --git a/yaksh/templates/yaksh/course_forum.html b/yaksh/templates/yaksh/course_forum.html index 4741ae0..41dbd7b 100644 --- a/yaksh/templates/yaksh/course_forum.html +++ b/yaksh/templates/yaksh/course_forum.html @@ -57,7 +57,9 @@ {% with thread.get_last_comment as last_comment %} <small> {% if thread.creator.profile.is_moderator %} INSTRUCTOR CREATED {% endif %} Last Post by: <strong>{{last_comment.creator}}</strong> . {{last_comment.modified_at|naturaltime}}</small> {% endwith %} - <small><a href="{% url "yaksh:delete_thread" course.id thread.uid %}" class="pull-right">Delete</i></a></small> + {% if user.profile.is_moderator %} + <small><a href="{% url "yaksh:hide_thread" course.id thread.uid %}" class="pull-right">Delete</i></a></small> + {% endif %} </div> </div> <br> diff --git a/yaksh/templates/yaksh/thread_comments.html b/yaksh/templates/yaksh/thread_comments.html index ab0ade9..f614b7a 100644 --- a/yaksh/templates/yaksh/thread_comments.html +++ b/yaksh/templates/yaksh/thread_comments.html @@ -11,7 +11,12 @@ <div class="card-header"> {{thread.title}} <br> - <small><strong>{{thread.creator.username}}</strong> {{thread.created_at}}</small> + <small> + <strong>{{thread.creator.username}}</strong> + {{thread.created_at}} + {% if user.profile.is_moderator %}<a href="{% url "yaksh:hide_thread" thread.course.id thread.uid %}" class="pull-right">Delete</a>{% endif %} + </small> + </div> <div class="card-body"> <p>{{thread.description}}</p> @@ -29,7 +34,10 @@ </a> {% endif %} <p>{{comment.description}}</p> - <small class="pull-right">by: <strong>{{comment.user.username}} </strong>. {{comment.created_at}}</small> + <small class="pull-right"> + by: <strong>{{comment.creator.username}} </strong>. {{comment.created_at}} + {% if user.profile.is_moderator %}<a href="{% url "yaksh:hide_comment" thread.course.id comment.uid %}">Delete</a>{% endif %} + </small> </div> <hr> {% endfor %} |