summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authorankitjavalkar2021-01-17 01:21:56 +0530
committerGitHub2021-01-17 01:21:56 +0530
commit9b9ebb227bbaafca3daf5485c3bbe0d948d3e843 (patch)
tree9ae8e5ea5b08c0baf9fd84621055afdc3c8cd64a /yaksh/templates
parentb98d41e77d0abdd6cc5a2fb0cf89fe0cbc0fb985 (diff)
parent3966ae20fc68041721f97c45ff92102ed5729aee (diff)
downloadonline_test-9b9ebb227bbaafca3daf5485c3bbe0d948d3e843.tar.gz
online_test-9b9ebb227bbaafca3daf5485c3bbe0d948d3e843.tar.bz2
online_test-9b9ebb227bbaafca3daf5485c3bbe0d948d3e843.zip
Merge pull request #804 from ankitjavalkar/crs-upload
Course upload and download with MD file formats
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/course_detail.html2
-rw-r--r--yaksh/templates/yaksh/course_detail_options.html5
-rw-r--r--yaksh/templates/yaksh/upload_download_course_md.html13
3 files changed, 20 insertions, 0 deletions
diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html
index 9f75a68..8661aea 100644
--- a/yaksh/templates/yaksh/course_detail.html
+++ b/yaksh/templates/yaksh/course_detail.html
@@ -55,6 +55,8 @@
{% include "yaksh/addteacher.html" %}
{% elif is_teachers %}
{% include "yaksh/course_teachers.html" %}
+ {% elif is_upload_download_md %}
+ {% include "yaksh/upload_download_course_md.html" %}
{% else %}
<div class="jumbotron">
<h1 class="display-4">Manage Course</h1>
diff --git a/yaksh/templates/yaksh/course_detail_options.html b/yaksh/templates/yaksh/course_detail_options.html
index 84f78ce..f9393ed 100644
--- a/yaksh/templates/yaksh/course_detail_options.html
+++ b/yaksh/templates/yaksh/course_detail_options.html
@@ -43,4 +43,9 @@
Current Teachers/TAs
</a>
</li>
+ <li class="nav-item">
+ <a class="nav-link list-group-item {% if is_upload_download_md %} active {% endif %}" href="{% url 'yaksh:upload_download_course_md' course.id %}" data-toggle="tooltip" title="Upload / Download MD files" data-placement="top">
+ Upload / Download MD
+ </a>
+ </li>
</ul> \ No newline at end of file
diff --git a/yaksh/templates/yaksh/upload_download_course_md.html b/yaksh/templates/yaksh/upload_download_course_md.html
new file mode 100644
index 0000000..072ae4c
--- /dev/null
+++ b/yaksh/templates/yaksh/upload_download_course_md.html
@@ -0,0 +1,13 @@
+<div>
+ <a href="{% url 'upload:download_course_md' course.id %}">
+ <i class="fa fa-download"></i>&nbsp;Download
+ </a>
+ <br><br>
+ <form action="" method="POST" enctype="multipart/form-data">
+ {% csrf_token %}
+ <input type="file" name="course_upload_md" required="">
+ <button class="btn btn-outline-success" id="course_upload_md_btn" name="course_upload_md_btn">
+ <i class="fa fa-upload"></i>&nbsp;Upload
+ </button>
+ </form>
+</div> \ No newline at end of file