diff src/main/webapp/pages/books.jsp @ 14:3387d855a194

new: toc status in books page
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Fri, 29 May 2015 11:00:09 +0200
parents 9c6e74761f60
children d81a5401b9af
line wrap: on
line diff
--- a/src/main/webapp/pages/books.jsp	Wed May 27 15:30:09 2015 +0200
+++ b/src/main/webapp/pages/books.jsp	Fri May 29 11:00:09 2015 +0200
@@ -152,6 +152,7 @@
 			});		
 				
 		});
+			
 	</script>
 </head>
 
@@ -195,7 +196,11 @@
 						<td><label class="tableTitle">Start Year</label></td>
 						
 						<td><label class="tableTitle">Edit TOC</label></td> <!-- go to toc page -->
-						<td><label class="tableTitle">TOC Finished</label></td> <!-- finished or not -->
+						<td><label class="tableTitle">TOC Finished</label>
+							<input type="image"
+								onclick="setAction('forceReloadBooks', 'booksForm');"
+								src="<%=sessionBean.getApplicationBean().getRefreshImage()%>" width="20" height="20"/>
+						</td> <!-- finished or not -->
 						<td><label class="tableTitle">Last Editor</label></td>
 						<td><label class="tableTitle">Edit Time</label></td>
 						
@@ -214,12 +219,23 @@
 						<td><%=book.getDynasty() %></td>
 						<td><%=book.getAdmin_type() %></td>
 						<td><%=book.getStart_year() %></td>
-
-						<!-- TODO -->
 						<td><a href="<%=sessionBean.getApplicationBean().getTocInterfaceUrl()%>/check_sections_details.php?book_id=<%=book.getId() %>&amp;count=100&amp;sessionId=<%= session.getId()%>" target="blank">
 						Edit TOC</a></td>
 						
-						<td>TODO<input type="checkbox" name="finished" value="0" <%= (book.getTocCorrection() == 1) ? "checked" : "" %>/><label>Finished</label></td>
+						<td>						
+						<% if (book.getToc_correction() == 1) { %>
+							<input type="image" name="tocBookId" value="<%=book.getId()%>"
+								onclick="setAction('unSetTocCorrection', 'booksForm');"
+								src="<%=sessionBean.getApplicationBean().getCheckboxCheckedImage()%>" width="20" height="20"/>	
+						<% } else { %>
+						
+							<input type="image" name="tocBookId" value="<%=book.getId()%>"
+								onclick="setAction('setTocCorrection', 'booksForm');"
+								src="<%=sessionBean.getApplicationBean().getCheckboxUncheckedImage()%>" width="20" height="20"/>
+								
+						<% } %>
+						</td>
+						
 						<td><%= (book.getCurrentSectionVersion() == null) ? "" : book.getCurrentSectionVersion().getEditor() %></td>
 						<td><%= (book.getCurrentSectionVersion() == null) ? "" : book.getCurrentSectionVersion().getDate() %></td>
 					</tr>