summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authorCruiseDevice2020-04-15 21:19:09 +0530
committerCruiseDevice2020-04-15 21:19:09 +0530
commit169228186d8c9ad880ee33c5190e49203d2c5243 (patch)
tree4638c2069208b259375429a635b3f40545d75419 /yaksh/templates
parent508e0e78bb0bd3e8ebbad81e948f13de5c01b20f (diff)
downloadonline_test-169228186d8c9ad880ee33c5190e49203d2c5243.tar.gz
online_test-169228186d8c9ad880ee33c5190e49203d2c5243.tar.bz2
online_test-169228186d8c9ad880ee33c5190e49203d2c5243.zip
Resolve comments
- Fix "'image' attribute has no file associated with it" issue. - Don't allow users who are not part of a course to see the discussion forum of that course. - Add Discussion forum link in moderator interface under course_details page. - Remove custom css for post and comments in Discussion forum. Use bootstrap 'img-fluid' class instead. 'img-fluid' fills the height and width of the card. - Use instance.uid instead of just instance in get_image_dir.
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/course_detail_options.html5
-rw-r--r--yaksh/templates/yaksh/course_forum.html5
-rw-r--r--yaksh/templates/yaksh/post_comments.html10
3 files changed, 12 insertions, 8 deletions
diff --git a/yaksh/templates/yaksh/course_detail_options.html b/yaksh/templates/yaksh/course_detail_options.html
index 90662d6..4dd4dda 100644
--- a/yaksh/templates/yaksh/course_detail_options.html
+++ b/yaksh/templates/yaksh/course_detail_options.html
@@ -30,6 +30,11 @@
</a>
</li>
<li class="nav-item">
+ <a href="{% url 'yaksh:course_forum' course.id %}" class="nav-link list-group-item" title="Discussion forum of this course" data-placement="top" data-toggle="tooltip">
+ Discussion Forum
+ </a>
+ </li>
+ <li class="nav-item">
<a class="nav-link list-group-item {% if is_add_teacher %} active {% endif %}" href="{% url 'yaksh:search_teacher' course.id %}" data-toggle="tooltip" title="Add Teachers/TAs to this course" data-placement="top">
Add Teachers/TAs
</a>
diff --git a/yaksh/templates/yaksh/course_forum.html b/yaksh/templates/yaksh/course_forum.html
index 407296f..3e4d07b 100644
--- a/yaksh/templates/yaksh/course_forum.html
+++ b/yaksh/templates/yaksh/course_forum.html
@@ -41,16 +41,13 @@
<br>
<br>
<div>
- <h3>Posts:</h3>
{% if posts %}
+ <h3>Posts:</h3>
{% for post in posts %}
<div class="card">
<div class="card-body">
<a href="{% url "yaksh:post_comments" course.id post.uid %}">{{post.title}}</a>
<br>
- {% if post.image %}
- <img src="{{post.image.url}}" class="post_image">
- {% endif %}
<p class="pull-right"><small>{{post.get_comments_count}}{% if post.get_comments_count > 1 %} replies{% else %} reply{% endif %}</small></p>
</div>
<div class="card-footer">
diff --git a/yaksh/templates/yaksh/post_comments.html b/yaksh/templates/yaksh/post_comments.html
index 89f0762..f5cc771 100644
--- a/yaksh/templates/yaksh/post_comments.html
+++ b/yaksh/templates/yaksh/post_comments.html
@@ -20,9 +20,11 @@
</div>
<div class="card-body">
<p>{{post.description}}</p>
- <a href="{{post.image.url}}" target="_blank">
- <img src="{{post.image.url}}" alt="">
- </a>
+ {% if post.image %}
+ <a href="{{post.image.url}}" target="_blank">
+ <img src="{{post.image.url}}" class="img-fluid" alt="">
+ </a>
+ {% endif %}
</div>
</div>
<br>
@@ -33,7 +35,7 @@
<div class="card-body">
{% if comment.image %}
<a href="{{comment.image.url}}" target="_blank">
- <img src="{{comment.image.url}}" class='comment_image'>
+ <img src="{{comment.image.url}}" class='img-fluid'>
</a>
{% endif %}
<p>{{comment.description}}</p>