summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authorCruiseDevice2020-09-08 15:02:22 +0530
committerankitjavalkar2020-10-08 10:40:08 +0530
commit25cb22481469f738d6aa9ed440474f34e22600aa (patch)
tree9cafb303cfc4ba8c3fb59afdd8ecbd9269d85135 /yaksh/templates
parente4a9897685b4958efb0d5bd86f57dc1584449619 (diff)
downloadonline_test-25cb22481469f738d6aa9ed440474f34e22600aa.tar.gz
online_test-25cb22481469f738d6aa9ed440474f34e22600aa.tar.bz2
online_test-25cb22481469f738d6aa9ed440474f34e22600aa.zip
Comments feature for video lesson
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/show_video.html36
1 files changed, 36 insertions, 0 deletions
diff --git a/yaksh/templates/yaksh/show_video.html b/yaksh/templates/yaksh/show_video.html
index 9e9d0b4..76a48d4 100644
--- a/yaksh/templates/yaksh/show_video.html
+++ b/yaksh/templates/yaksh/show_video.html
@@ -227,6 +227,42 @@
</div>
</div>
{% endif %}
+ {% if comments %}
+ {% for comment in comments %}
+ <div class="card mb-2">
+ <div class="card-body p-3">
+ <div class="row mb-3">
+ <div class="col-6">
+ <strong class="text-muted">{{comment.creator.username}}</strong>
+ </div>
+ <div class="col-6 text-right">
+ <small class="text-muted">{{comment.created_at}} {% if user.profile.is_moderator %} <a href="{% url 'yaksh:hide_comment' course.id comment.uid %}" class="btn btn-danger">Delete</a>{% endif %}</small>
+ </div>
+ </div>
+ <p class="card-text description">{{comment.description}}</p>
+ <div>
+ {% if comment.image %}
+ <a href="{{comment.image.url}}" target="_blank">
+ <center><img src="{{comment.image.url}}" class="comment_image thumbnail" alt=""></center>
+ </a>
+ {% endif %}
+ </div>
+ </div>
+ </div>
+ {% endfor %}
+ {% endif %}
+ {% if state == 'lesson' %}
+ <div>
+ <b><u>Add comment:</u></b>
+ <form action="" method="POST" enctype='multipart/form-data'>
+ <div class="form-group">
+ {% csrf_token %}
+ {{form}}
+ </div>
+ <input type="submit" value="Submit" class="btn btn-success">
+ </form>
+ </div>
+ {% endif %}
</div>
</div>
<div id="dialog"></div>