diff src/main/webapp/pages/branchPage.jsp @ 58:b8ad346e39a0

new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Mon, 02 May 2016 12:03:30 +0200
parents a00efd5d9e77
children bc0219c2600b
line wrap: on
line diff
--- a/src/main/webapp/pages/branchPage.jsp	Wed Feb 17 14:58:19 2016 +0100
+++ b/src/main/webapp/pages/branchPage.jsp	Mon May 02 12:03:30 2016 +0200
@@ -1,4 +1,5 @@
 <%@page import="de.mpiwg.gazetteer.dataverse.bo.VDCUser"%>
+<%@page import="de.mpiwg.gazetteer.bo.LGBranch"%>
 <%@page import="de.mpiwg.gazetteer.bo.LGFile"%>
 <%@page import="org.apache.commons.lang.StringUtils"%>
 <%@page import="de.mpiwg.gazetteer.db.DBSection"%>
@@ -186,12 +187,6 @@
 									</tr>
 									
 									
-									
-									
-									
-									
-									
-									
 									<tr>
 										<td><label>Created</label></td>
 										<td><label><%=sessionBean.getBranchPage().getBranch().getFomattedCreation() %></label></td>
@@ -258,11 +253,22 @@
 										<td><label><%=sessionBean.getBranchPage().getLastFile().getFomattedCreation() %></label></td>
 									</tr>									
 									<tr>
-										<td><label>Text</label></td>
+										<td><label>Tagged Text</label>
+											<% LGBranch branch = sessionBean.getBranchPage().getBranch(); %>
+											<a onclick="branchInExtractionInterface('<%=branch.getId() %>', '<%=branch.getCurrentLastFileId() %>', '<%=branch.getSectionId() %>', '<%=branch.getSection().getName() %>', '<%=branch.getBook().getId() %>', '<%=branch.getBook().getName() %>', '<%=sessionBean.getUser().getId() %>', '<%=sessionBean.getApplicationBean().getExtractionInterfaceUrl()%>');">
+												<img title="Show Task in Extraction Interface" src="<%=sessionBean.getApplicationBean().getEditImage()%>"/>
+											</a>
+										
+										</td>
+										
 										<td>
 											<textarea rows=20" cols="70">
 												<%=sessionBean.getBranchPage().getText() %>
-											</textarea>											
+											</textarea>	
+											<a href="<%=sessionBean.getApplicationBean().getRootServer() %>/rest/text/downloadFileText?fileId=<%=branch.getCurrentLastFileId() %>"
+														target="_blank">
+													<img title="Download text (XML)" src="<%=sessionBean.getApplicationBean().getDownloadImage()%>"/>
+											</a>											
 										</td>
 									</tr>
 								</table>
@@ -283,14 +289,14 @@
 											<th><label class="tableTitle">Version</label></th>
 											<th><label class="tableTitle">User</label></th>
 											<th><label class="tableTitle">Created</label></th>
-											<th><label class="tableTitle">Text</label></th>
-											<th><label class="tableTitle">View in table</label></th>
-											<th><label class="tableTitle">Text(to be published)</label></th>
+											<th><label class="tableTitle">Tagged text (XML)</label></th>
+											<th><label class="tableTitle">View table</label></th>
+											<th><label class="tableTitle">Table in CSV (tab-delimited)</label></th>
 											<th><label class="tableTitle">Upload to LGDataverse</label><br>
 												
 												<% LGFile lastFile = sessionBean.getBranchPage().getLastFile();
 													if(lastFile.getDvId() == null) {%>
-														<button type="button" class="get-studies" data-file-id="<%=lastFile.getId()%>">Upload it</button>
+														<button type="button" class="get-studies" data-file-id="<%=lastFile.getId()%>">Upload the latest version</button>
 													<% } else if (lastFile.getFileIdInDv() == null) { %>
 														<label><i>Uploaded, but it's been deleted from <a href="<%=lastFile.getDatasetUrl() %>" target="_blank"><%= lastFile.getDatasetTitle() %></a></i></label>	
 														<button type="button" class="get-studies" data-file-id="<%=lastFile.getId()%>">Re-upload it</button>
@@ -312,24 +318,39 @@
 												<td><label><%= file.getUsername() %></label></td>
 												<td><label><%= file.getFomattedCreation() %></label></td>
 												<td>
+													<!-- action change to download the file, instead of open file in a new tab -->
+													
+													<a href="<%=sessionBean.getApplicationBean().getRootServer() %>/rest/text/downloadFileText?fileId=<%=file.getId() %>"
+														target="_blank">
+														<img title="Download XML file" src="<%=sessionBean.getApplicationBean().getDownloadImage()%>"/>
+													</a>
+													<!-- 
 													<a href="<%=sessionBean.getApplicationBean().getRootServer() %>/rest/text/getFileText?fileId=<%=file.getId() %>"
 														target="_blank">
 														<img title="Show text" src="<%=sessionBean.getApplicationBean().getShowImage()%>"/>
 													</a>
+													-->
 												</td>
 												<td>
 													<a href="<%=sessionBean.getApplicationBean().getRootServer() %>/rest/text/getTable4File?fileId=<%=file.getId() %>"
 														target="_blank">
-														<img title="Show table" src="<%=sessionBean.getApplicationBean().getShowImage()%>"/>
+														<img title="Show table (html)" src="<%=sessionBean.getApplicationBean().getShowImage()%>"/>
 													</a>												
 												</td>	
 												
 												<!-- add to get tab-delimited file -->
+												<!-- Taction change to download the csv file, instead of open file in a new tab -->
 												<td>
+													<a href="<%=sessionBean.getApplicationBean().getRootServer() %>/rest/text/downloadTabDelimited4File?fileId=<%=file.getId() %>"
+														target="_blank">
+														<img title="Download CSV file (tab-delimited)" src="<%=sessionBean.getApplicationBean().getDownloadImage()%>"/>
+													</a>
+													<!-- 
 													<a href="<%=sessionBean.getApplicationBean().getRootServer() %>/rest/text/getTabDelimited4File?fileId=<%=file.getId() %>"
 														target="_blank">
 														<img title="Show text" src="<%=sessionBean.getApplicationBean().getShowImage()%>"/>
-													</a>												
+													</a>
+													 -->												
 												</td>	
 														
 												<td>