From 41bc272db70241672f9f7e11f28818c5f0492ee0 Mon Sep 17 00:00:00 2001
From: hardythe1
Date: Thu, 28 Aug 2014 11:32:56 +0530
Subject: added condition to remove options to approve & notify book if the
 book is approved

---
 tbc/templates/tbc/book-review-details.html | 37 ++++++++++++++++++------------
 1 file changed, 22 insertions(+), 15 deletions(-)

(limited to 'tbc')

diff --git a/tbc/templates/tbc/book-review-details.html b/tbc/templates/tbc/book-review-details.html
index f304a66..ec90cd0 100644
--- a/tbc/templates/tbc/book-review-details.html
+++ b/tbc/templates/tbc/book-review-details.html
@@ -11,21 +11,27 @@
 {% endfor %}
 </div>
 <hr>
-<ul>
-{% for chapter in chapters %}
-    <li><a href="{% url 'tbc:ConvertNotebook' chapter.notebook %}">{{ chapter.name }}</a></li>
-{% endfor %}
-</ul>
+<table class="table table-bordered table-hover">
+    {% for chapter in chapters %}
+        <tr>
+            <td><a href="{% url 'tbc:ConvertNotebook' chapter.notebook %}">{{ chapter.name }}</a></td>
+        </tr>
+    {% endfor %}
+</table>
 <hr>
-<form action="/approve-book/{{ book.id }}" method="POST">
-{% csrf_token %}
-<select name=approve_notify>
-    <option value=none>Select an Action</option>
-    <option value="approve">Approve</option>
-    <option value="notify">Notify Changes</option>
-</select>
-<input type=submit value=GO>
-</form>
+{% if book.approved %}
+<h3>Book has been completed & approved</h3>
+{% else %}
+    <form action="/approve-book/{{ book.id }}" method="POST">
+        {% csrf_token %}
+        <select name=approve_notify>
+            <option value=none>Select an Action</option>
+            <option value="approve">Approve</option>
+            <option value="notify">Notify Changes</option>
+        </select>
+        <input type=submit value=GO>
+    </form>
+{% endif %}
 <table>
 <tr><td>Author: &nbsp;&nbsp;<td>{{ book.author }}
 <tr><td>Publisher: &nbsp;&nbsp;<td>{{ book.publisher_place }}
@@ -33,7 +39,8 @@
 <tr><td>Contributor: &nbsp;&nbsp;<td>{{ book.contributor.user.first_name }} {{ book.contributor.user.last_name }}
 <tr><td>Email: &nbsp;&nbsp;<td>{{ book.contributor.user.email }}<br>
 </table>
-<table class='table'>
+<hr>
+<table class="table table-bordered table-hover">
     <tr>
         <th>User</th>
         <th>Time</th>
-- 
cgit