diff options
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/show_toc.html | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/yaksh/templates/yaksh/show_toc.html b/yaksh/templates/yaksh/show_toc.html index ddaad74..92ea0cd 100644 --- a/yaksh/templates/yaksh/show_toc.html +++ b/yaksh/templates/yaksh/show_toc.html @@ -1,13 +1,21 @@ -<div> - <form action="" method="POST" enctype="multipart/form-data"> - {% csrf_token %} - <input type="file" name="toc" required=""> - <button class="btn btn-outline-success" id="upload_toc" name="upload_toc"> - <i class="fa fa-upload"></i> Upload TOC - </button> - </form> -</div> -<hr> +{% load custom_filters %} +{% has_lesson_video lesson_id as has_video %} +{% if has_video %} + <div> + <a href="{% url 'yaksh:download_sample_toc' %}"> + <i class="fa fa-download"></i> Download Sample + </a> + <br><br> + <form action="" method="POST" enctype="multipart/form-data"> + {% csrf_token %} + <input type="file" name="toc" required=""> + <button class="btn btn-outline-success" id="upload_toc" name="upload_toc"> + <i class="fa fa-upload"></i> Upload TOC + </button> + </form> + </div> + <hr> +{% endif %} <table class="table table-responsive-sm"> {% for toc in contents %} {% with toc.get_toc_text as toc_name %} |