summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authorCruiseDevice2020-04-13 17:27:49 +0530
committerCruiseDevice2020-04-13 17:27:49 +0530
commit2f9331717075b34534f2745706f57a98f7dce20d (patch)
treee942155f11e47299d7deb5447267c0055e49d4de /yaksh/templates
parent0e6c7d589114450d5cd1bc581ee1692c235f1a73 (diff)
downloadonline_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.html4
-rw-r--r--yaksh/templates/yaksh/thread_comments.html12
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 %}