diff options
Diffstat (limited to 'tbc/templates')
-rwxr-xr-x | tbc/templates/base.html | 2 | ||||
-rw-r--r-- | tbc/templates/tbc/book-details.html | 2 | ||||
-rw-r--r-- | tbc/templates/tbc/book-review-details.html | 32 | ||||
-rw-r--r-- | tbc/templates/tbc/book-review.html | 10 | ||||
-rw-r--r-- | tbc/templates/tbc/browse-books.html | 19 | ||||
-rw-r--r-- | tbc/templates/tbc/upload-content.html | 19 |
6 files changed, 76 insertions, 8 deletions
diff --git a/tbc/templates/base.html b/tbc/templates/base.html index 042203c..bcbf19b 100755 --- a/tbc/templates/base.html +++ b/tbc/templates/base.html @@ -82,7 +82,7 @@ {% for item in items %} <div class ="module-list"> <a href="{% url 'tbc:BookDetails' item.book.id %}"><img src="{% static 'uploads/' %}{{ item.image.image }}"></a> - <center><a href="{% url 'tbc:BookDetails' item.book.id %}">{{ item.book.name }}</a></center> + <center><a href="{% url 'tbc:BookDetails' item.book.id %}">{{ item.book.title }}</a></center> </div> {% endfor %} </div> diff --git a/tbc/templates/tbc/book-details.html b/tbc/templates/tbc/book-details.html index 20b472a..5061ca7 100644 --- a/tbc/templates/tbc/book-details.html +++ b/tbc/templates/tbc/book-details.html @@ -1,7 +1,7 @@ {% extends 'base.html' %} {% load static %} {% block content %} -<center><h3>{{ book.name }}</h3></center> +<center><h3>{{ book.title }}</h3></center> <div class="row-fluid"> {% for image in images %} <div class ="module-list"> diff --git a/tbc/templates/tbc/book-review-details.html b/tbc/templates/tbc/book-review-details.html new file mode 100644 index 0000000..f7c0d0e --- /dev/null +++ b/tbc/templates/tbc/book-review-details.html @@ -0,0 +1,32 @@ +{% extends 'base.html' %} +{% load static %} +{% block content %} +<center><h3>{{ book.title }}</h3></center> +<div class="row-fluid"> +{% for image in images %} + <div class ="module-list"> + <img src="{% static 'uploads/' %}{{ image.image }}"> + <center><p>{{ image.caption }}</p></center> + </div> +{% endfor %} +</div> +<hr> +<ol> +{% for chapter in chapters %} + <li><a href="https://www.nbviewer.ipython.org/url/fosseeapps.in{% static 'uploads/' %}{{ chapter.notebook }}">{{ chapter.name }}</a> +{% endfor %} +</ol> +<hr> +<form action="/approve-book/{{ book.id }}" method=POST enctype="multipart/form-data"> +{% csrf_token %} +<center><input type=submit name=approve value="Approve & Push"> +<input type=submit name=sendmail value="Notify for changes"></center> +</form> +<table> +<tr><td>Author: <td>{{ book.author }} +<tr><td>Publisher: <td>{{ book.publisher }} +<tr><td>ISBN: <td>{{ book.isbn }} +<tr><td>Contributor: <td>{{ book.contributor.user.first_name }} {{ book.contributor.user.last_name }} +<tr><td>Email: <td>{{ book.contributor.user.email }}<br> +</table> +{% endblock %} diff --git a/tbc/templates/tbc/book-review.html b/tbc/templates/tbc/book-review.html new file mode 100644 index 0000000..deaeac6 --- /dev/null +++ b/tbc/templates/tbc/book-review.html @@ -0,0 +1,10 @@ +{% extends 'base.html' %} +{% load static %} +{% block content %} +<center><h3>Books to be reviewed</h3></center> +<ol> +{% for book in books %} + <li><a href="{% url 'tbc:BookReview' book.id %}">{{ book.title }} {{ book.edition }} Edition</a> +{% endfor %} +</ol> +{% endblock %} diff --git a/tbc/templates/tbc/browse-books.html b/tbc/templates/tbc/browse-books.html index 36f292a..6047ce1 100644 --- a/tbc/templates/tbc/browse-books.html +++ b/tbc/templates/tbc/browse-books.html @@ -1,9 +1,18 @@ {% extends 'base.html' %} {% load static %} + +{% block script %} +<script type="text/javascript"> +function submitCategory() +{ + category = document.getElementById("category").value; + window.location.replace("/browse-books/"+category); +} +</script> +{% endblock %} + {% block content %} -<form action="/browse-books/" method=POST enctype="multipart/form-data"> -{% csrf_token %} -<center><select name="category"> +<center><select name="category" id="category" onchange="submitCategory();"> <option value="computer science">Computer Science</option> <option value="chemical engg">Chemical Engg</option> <option value="aerospace engg">Aerospace Engg</option> @@ -12,13 +21,11 @@ <option value="mechanical engg">Mechanical Engg</option> <option value="mathematics">Mathematics</option> </select> -<input type=submit value=Search> -</form> <div class="row-fluid"> {% for item in items %} <div class ="module-list"> <img src="{% static 'uploads/' %}{{ item.image.image }}"> - <center><a href="{% url 'tbc:BookDetails' item.book.id %}">{{ item.book.name }}</a></center> + <center><a href="{% url 'tbc:BookDetails' item.book.id %}">{{ item.book.title }}</a></center> </div> {% endfor %} </div> diff --git a/tbc/templates/tbc/upload-content.html b/tbc/templates/tbc/upload-content.html new file mode 100644 index 0000000..4ea9974 --- /dev/null +++ b/tbc/templates/tbc/upload-content.html @@ -0,0 +1,19 @@ +{% extends 'base.html' %} +{% block content %} +<p>Upload chapters as individual IPython notebooks </p> +<form action="/upload-content/" method=POST enctype="multipart/form-data"> +{% csrf_token %} +{% for i in no_notebooks %} +<input type=text name=chapter{{i}}> +<input type=file name=notebook{{i}}> +{% endfor %} +<br> +<hr> +<p>Upload 3 screenshots from any 3 random chapters and give proper captions</p> +{% for i in no_images %} +<input type=text name=caption{{i}}> +<input type=file name=image{{i}}> +{% endfor %} +<center><input type=submit value=submit></center> +</form> +{% endblock %} |