diff options
author | ankitjavalkar | 2020-10-14 18:15:52 +0530 |
---|---|---|
committer | ankitjavalkar | 2020-10-14 18:15:52 +0530 |
commit | 89519c5d4c2ac07687b98911b7db9618e5204b86 (patch) | |
tree | 253e014259b72f5c67e76d9ce17a0313a3268c5a | |
parent | 430c8d1480d897e9fc0dc328bad173642d0a2946 (diff) | |
download | online_test-89519c5d4c2ac07687b98911b7db9618e5204b86.tar.gz online_test-89519c5d4c2ac07687b98911b7db9618e5204b86.tar.bz2 online_test-89519c5d4c2ac07687b98911b7db9618e5204b86.zip |
Allow added teachers to delete posts/comments
-rw-r--r-- | yaksh/templates/yaksh/lessons_forum.html | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/post_comments.html | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/yaksh/templates/yaksh/lessons_forum.html b/yaksh/templates/yaksh/lessons_forum.html index 250536d..58fb360 100644 --- a/yaksh/templates/yaksh/lessons_forum.html +++ b/yaksh/templates/yaksh/lessons_forum.html @@ -61,7 +61,7 @@ {% endwith %} </td> <td> - {% if user == course.creator %} + {% if user == course.creator or user in course.get_teachers %} <small><a href="{% url 'yaksh:hide_post' course.id post.uid %}" class="pull-right fa fa-trash"></i></a></small> {% endif %} </td> diff --git a/yaksh/templates/yaksh/post_comments.html b/yaksh/templates/yaksh/post_comments.html index bc452e0..70aac47 100644 --- a/yaksh/templates/yaksh/post_comments.html +++ b/yaksh/templates/yaksh/post_comments.html @@ -38,7 +38,7 @@ {% endif %} </strong> {{post.created_at}} - {% if user == course.creator %}<a href="{% url 'yaksh:hide_post' post.target.id post.uid %}" class="pull-right fa fa-trash"></a>{% endif %} + {% if user == course.creator or user in course.get_teachers %}<a href="{% url 'yaksh:hide_post' post.target.id post.uid %}" class="pull-right fa fa-trash"></a>{% endif %} </small> </div> @@ -77,7 +77,7 @@ </strong> </div> <div class="col-6 text-right"> - <small class="text-muted">{{comment.created_at}} {% if user == course.creator %} <a href="{% url 'yaksh:hide_comment' post.target.id comment.uid %}" class="fa fa-trash"></a>{% endif %}</small> + <small class="text-muted">{{comment.created_at}} {% if user == course.creator or user in course.get_teachers %} <a href="{% url 'yaksh:hide_comment' post.target.id comment.uid %}" class="fa fa-trash"></a>{% endif %}</small> </div> </div> <p class="card-text description">{{comment.description|safe}}</p> |