summaryrefslogtreecommitdiff
path: root/tbc/templates
diff options
context:
space:
mode:
authorprathamesh2015-08-11 17:34:38 +0530
committerprathamesh2015-08-11 17:34:38 +0530
commitb13f51268caacf987365c3cda89b812d9d1b2255 (patch)
tree95e0d810c9d43f4ad9289038a10725e3c42bdaf2 /tbc/templates
parent5ea568246060dc8757be70eb22826f38cc720282 (diff)
downloadPython-TBC-Interface-b13f51268caacf987365c3cda89b812d9d1b2255.tar.gz
Python-TBC-Interface-b13f51268caacf987365c3cda89b812d9d1b2255.tar.bz2
Python-TBC-Interface-b13f51268caacf987365c3cda89b812d9d1b2255.zip
interface to fix broken books.
Diffstat (limited to 'tbc/templates')
-rw-r--r--tbc/templates/tbc/brokenbooks.html24
-rw-r--r--tbc/templates/tbc/link_image.html47
2 files changed, 71 insertions, 0 deletions
diff --git a/tbc/templates/tbc/brokenbooks.html b/tbc/templates/tbc/brokenbooks.html
new file mode 100644
index 0000000..07cfebb
--- /dev/null
+++ b/tbc/templates/tbc/brokenbooks.html
@@ -0,0 +1,24 @@
+{% extends 'base.html' %}
+{% load static %}
+
+{% block script %}
+<script type="text/javascript">
+function submitBook()
+{
+ document.forms.brokenbooks.submit();
+}
+</script>
+
+{% endblock %}
+{% block content %}
+<center><h4>Select any book from the drop down below to fix the broken link:</h4></center>
+<form name="brokenbooks" action="/brokenbooks/" method=POST enctype="multipart/form-data">
+{% csrf_token %}
+<center>
+ <select style="border-color:black" name="books" id="books" onchange="submitBook()">
+ <option value=0>Select Book</option>
+ {% for book in books_to_link %}
+ <option value={{ book.id }}>{{ book }}</option>
+ {% endfor %}
+ </select>
+{% endblock %}
diff --git a/tbc/templates/tbc/link_image.html b/tbc/templates/tbc/link_image.html
new file mode 100644
index 0000000..befa301
--- /dev/null
+++ b/tbc/templates/tbc/link_image.html
@@ -0,0 +1,47 @@
+{% extends 'base.html' %}
+{% block content %}
+
+ <center><font color='blue'><b>
+ {% if success %}
+ Thank you for your contribution.<br>
+ Click <a href={% url 'tbc:brokenbooks' %}>Broken Books</a> to contribute further.<br>
+ {% else %}
+ Link image for the book
+ {{ book.title }} by {{ book.author }}.<br>
+ Select an appropriate chapter from the dropdown for the corresponding image.<br>
+ You can verify using the chapters link given at the bottom.<br>
+ Once you are sure, click on Submit button.
+ </font></b>
+ </center>
+ <hr>
+ <form action="/link-image/" method=POST enctype="multipart/form-data">
+ {% csrf_token %}
+ <input type="hidden" name="book" value={{book.id}}>
+ <div class ="row-fluid">
+ {% for screenshot in screenshots %}
+ <!--<a href="/static/uploads/{{ screenshot.image }}" target="_blank">{{ screenshot }}</a>-->
+ <div class ="module-list">
+ <img src="/static/uploads/{{ screenshot.image }}">
+ <br>
+ <select style="border-color:black" name="chapters{{screenshot.id}}" id="chapters{{screenshot.id}}">
+ {% for chapter in chapters %}
+ <option value={{ chapter.id }}>{{ chapter }}</option>
+ {% endfor %}
+ </select>
+ <hr>
+ </div>
+ {% endfor %}
+ </div>
+ <br>
+ <div >
+ <b><u> Below are the links to the chapters:</u></b><br>
+
+ {% for chapter in chapters %}
+ <a href="{% url 'tbc:ConvertNotebook' chapter.notebook %}" target="_blank">{{ chapter }}</a>
+ <br>
+ {% endfor %}
+ </div>
+ <center><input class="btn btn-primary" type=submit value=submit></center>
+ </form>
+{% endif %}
+{% endblock %}