From 7e5608d0853d69358c14f9fb8fbd6465e21b8962 Mon Sep 17 00:00:00 2001 From: adityacp Date: Mon, 7 Sep 2020 12:53:08 +0530 Subject: Add edit and delete table of contents options --- yaksh/templates/yaksh/add_lesson.html | 6 +++++ yaksh/templates/yaksh/add_topic.html | 2 +- yaksh/templates/yaksh/add_video_quiz.html | 2 +- yaksh/templates/yaksh/show_toc.html | 39 +++++++++++++++++++++++++------ 4 files changed, 40 insertions(+), 9 deletions(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/add_lesson.html b/yaksh/templates/yaksh/add_lesson.html index 62aa881..6018e54 100644 --- a/yaksh/templates/yaksh/add_lesson.html +++ b/yaksh/templates/yaksh/add_lesson.html @@ -158,7 +158,13 @@
{% if lesson_form.instance and lesson_form.instance.video_path %} {% with lesson_form.instance.video_path|video_name as video %} + {% if video.1 == "others" %} + + {% else %}
+ {% endif %}
{% csrf_token %} diff --git a/yaksh/templates/yaksh/add_topic.html b/yaksh/templates/yaksh/add_topic.html index 8c8fdb3..52923e7 100644 --- a/yaksh/templates/yaksh/add_topic.html +++ b/yaksh/templates/yaksh/add_topic.html @@ -1,5 +1,5 @@ {% if topic_id %} - + {% else %} {% endif %} diff --git a/yaksh/templates/yaksh/add_video_quiz.html b/yaksh/templates/yaksh/add_video_quiz.html index cf59fcb..ad087bc 100644 --- a/yaksh/templates/yaksh/add_video_quiz.html +++ b/yaksh/templates/yaksh/add_video_quiz.html @@ -3,7 +3,7 @@ {% if question_id %} - + {% else %} {% endif %} diff --git a/yaksh/templates/yaksh/show_toc.html b/yaksh/templates/yaksh/show_toc.html index 85bcf40..b263652 100644 --- a/yaksh/templates/yaksh/show_toc.html +++ b/yaksh/templates/yaksh/show_toc.html @@ -1,8 +1,9 @@ {% for toc in contents %} + {% with toc.get_toc_text as toc_name %} + {% endwith %} +{% empty %} +
+ No Table of contents added +
{% endfor %} +
- {{ toc.get_toc_text }} + {{ toc_name }} {{toc.get_content_display}} @@ -12,18 +13,42 @@ {% if toc.content == 1 %} - + {% else %} - + {% endif %} -  Edit +  Edit - -  Delete - + + {% csrf_token %} + + +
\ No newline at end of file -- cgit