diff options
Diffstat (limited to 'tbc/templates')
-rw-r--r-- | tbc/templates/tbc/book-review-details.html | 3 | ||||
-rw-r--r-- | tbc/templates/tbc/confirm-details.html | 48 | ||||
-rw-r--r-- | tbc/templates/tbc/review-proposal.html | 12 | ||||
-rw-r--r-- | tbc/templates/tbc/update-code.html | 22 |
4 files changed, 83 insertions, 2 deletions
diff --git a/tbc/templates/tbc/book-review-details.html b/tbc/templates/tbc/book-review-details.html index 7e52c26..1aa888c 100644 --- a/tbc/templates/tbc/book-review-details.html +++ b/tbc/templates/tbc/book-review-details.html @@ -31,6 +31,9 @@ </select> <input type=submit value=GO> </form> + {% ifequal proposal.status 'codes disapproved' %} + <p>The required corrections have already been notified to the user. Kindly check the Activity Log for more details</p> + {% endifequal %} {% endif %} <table> <tr><td>Author: <td>{{ book.author }} diff --git a/tbc/templates/tbc/confirm-details.html b/tbc/templates/tbc/confirm-details.html index 26007ea..96393ac 100644 --- a/tbc/templates/tbc/confirm-details.html +++ b/tbc/templates/tbc/confirm-details.html @@ -1,11 +1,57 @@ {% extends 'base.html' %} {% block content %} <div id="content-wrap" style="max-width:600px;"> + <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> + <h3 id="myModalLabel">Verify Details</h3> + </div> + <div class="modal-body"> + <p>You are submitting codes for the book <br> <b>{{ book.title }} by {{ book.author }}</b>. + <br>Kindly verify the book details & <b>enter the number of chapters</b> you will submit the codes for.</p> + <p>Note: Consider only those chapters which have solved examples</p></p> + </div> + <div class="modal-footer"> + <button class="btn btn-primary" data-dismiss="modal">Ok</button> + </div> + </div> + <div id="chapterModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> + <h3 id="myModalLabel">Invalid number of chapters</h3> + </div> + <div class="modal-body"> + <p>No of chapters cannot be less than 0 or greater than 100</p> + <p>However, if the textbook has more than 100 chapters kindly contact the reviewer.</p> + </div> + <div class="modal-footer"> + <button class="btn btn-primary" data-dismiss="modal">Ok</button> + </div> + </div> <form action="/confirm-book-details/" method=POST enctype="multipart/form-data"> {% csrf_token %} {{ form.as_table }} <br> - <input class="btn btn-primary" type=submit value="Update Book"> + <input class="btn btn-primary" type=submit onclick="return validateChapters();" value="Update Details"> </form> </div> {% endblock %} + +{% block script %} + <script> + $(document).ready(function() { + $("#myModal").modal(); + }); + + function validateChapters() + { + no_chapters = document.getElementById("id_no_chapters").value + if (no_chapters <= 0 || no_chapters > 100) + { + $("#chapterModal").modal(); + return false; + } + return true; + } + </script> +{% endblock %} diff --git a/tbc/templates/tbc/review-proposal.html b/tbc/templates/tbc/review-proposal.html index 9c6aca9..b660db8 100644 --- a/tbc/templates/tbc/review-proposal.html +++ b/tbc/templates/tbc/review-proposal.html @@ -68,7 +68,17 @@ {% endifequal %} </h5> <h5><b>Book Accepted/Alloted:</b> {{ proposal.proposal.accepted.title }}</h5> - {% ifequal proposal.proposal.status "samples" %} + {% ifequal proposal.proposal.status "sample resubmitted" %} + {% if proposal.sample.sample_notebook %} + <h5><a href="{% static 'uploads/' %}{{ proposal.sample.sample_notebook }}">sample notebook</a><br></h5> + <a class="btn btn-primary" href="{% url 'tbc:DisapproveProposal' proposal.proposal.id %}">Disapprove Samples</a> + <a class="btn btn-primary" href="{% url 'tbc:AllotBook' proposal.proposal.id %}">Alot Book</a> + <h5>This is resubmission of the sample notebook</h5> + {% else %} + <h5>Contributor has not re submitted sample notebook yet.</h5> + {% endif %} + {% endifequal %} + {% ifequal proposal.proposal.status "sample submitted" %} {% if proposal.sample.sample_notebook %} <h5><a href="{% static 'uploads/' %}{{ proposal.sample.sample_notebook }}">sample notebook</a><br></h5> <a class="btn btn-primary" href="{% url 'tbc:DisapproveProposal' proposal.proposal.id %}">Disapprove Samples</a> diff --git a/tbc/templates/tbc/update-code.html b/tbc/templates/tbc/update-code.html new file mode 100644 index 0000000..cce2038 --- /dev/null +++ b/tbc/templates/tbc/update-code.html @@ -0,0 +1,22 @@ +{% extends 'base.html' %} +{% block content %} + <div id="content-wrap" style="max-width:600px;"> + <p>You are updating codes for the book {{ book.title }} by {{ book.author }}</p> + <p>Upload the corrected IPython Notebooks & screen shots.</p> + <form action="/submit-code/" method=POST enctype="multipart/form-data"> + {% csrf_token %} + {% for chapter in chapters %} + <input type=text name=chapter{{forloop.counter}} value="{{ chapter.name }}"> + <input type=file name=notebook{{forloop.counter}}> + {% endfor %} + <br> + <hr> + <p>Upload 3 screenshots from any 3 random chapters and give proper captions</p> + {% for screenshot in screenshots %} + <input type=text name=caption{{forloop.counter}} value="{{ screenshot.caption }}"> + <input type=file name=image{{forloop.counter}}> + {% endfor %} + <center><input type=submit value=submit></center> + </form> + </div> +{% endblock %} |