changeset 57:5cbe567a9c52

new: a link to view section text in ext-interface on full text searching page. bug fixed: a default topicId passed when doing search and full text search
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Wed, 17 Feb 2016 14:58:19 +0100
parents dd8348304dba
children b8ad346e39a0
files src/main/java/de/mpiwg/web/jsp/TopicListPage.java src/main/resources/config.properties src/main/webapp/pages/fullTextSearch.jsp src/main/webapp/pages/home.jsp src/main/webapp/pages/search.jsp
diffstat 5 files changed, 23 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/web/jsp/TopicListPage.java	Tue Feb 16 15:14:18 2016 +0100
+++ b/src/main/java/de/mpiwg/web/jsp/TopicListPage.java	Wed Feb 17 14:58:19 2016 +0100
@@ -60,7 +60,8 @@
 		
 		
 		this.completeTopicList = new ArrayList<LGTopic>();
-	
+		
+		// TODO sometimes this.getSessionBean() will cause NullPointerException
 		if(this.getSessionBean().getUser() != null){
 			for(LGTopic topic : DataProvider.getInstance().getTopics(this.getSessionBean().getUser().getId())){
 				
@@ -75,6 +76,8 @@
 		
 			sortByLastModifiedDown();	// default sorting by from lasted modified to oldest
 		}
+	
+		
 		
 	}
 	
--- a/src/main/resources/config.properties	Tue Feb 16 15:14:18 2016 +0100
+++ b/src/main/resources/config.properties	Wed Feb 17 14:58:19 2016 +0100
@@ -16,6 +16,7 @@
 lgmap=http://localhost:1080/localgazetteers-dev/LGMap/map.php?mode=1
 lgmap_datasets=/Applications/MAMP/htdocs/localgazetteers-dev/LGMap/datasets
 
+
 # Production one:
 #localgazetteers-dev -> localgazetteers
 #db_gazetter_username=root
--- a/src/main/webapp/pages/fullTextSearch.jsp	Tue Feb 16 15:14:18 2016 +0100
+++ b/src/main/webapp/pages/fullTextSearch.jsp	Wed Feb 17 14:58:19 2016 +0100
@@ -697,6 +697,7 @@
 									</tr>
 								</table>	
 							</th>
+							<th><label class="tableTitle">View Text</label></th>
 							<th>
 								<table class="sortTable">
 									<tr>
@@ -740,7 +741,7 @@
 								</table>	
 								
 							</th>
-							<th><label class="tableTitle">Select rows</th>
+							<th><label class="tableTitle">Select rows</label></th>
 						</tr>
 					
 		
@@ -764,6 +765,18 @@
 							<td><%=content.getSection().getBook().getAdmin_type() %></td>
 							<td><%=content.getSection().getName() %></td>
 							<td><%=content.getSection().getPages()%></td>
+					
+							<!-- View text in Ext-Interface -->
+							<td>
+								<a href="#"
+									title="Show Section in Extraction Interface"
+								 	onclick="sectionInExtractionInterface('<%=content.getSection().getId() %>', '<%=content.getSection().getName() %>', '<%=content.getSection().getBook().getId() %>', '<%=content.getSection().getBook().getName() %>', '<%=sessionBean.getTopicListPage().getCompleteTopicList().get(0).getId() %>', '<%=sessionBean.getUser().getId() %>', '<%=sessionBean.getApplicationBean().getExtractionInterfaceUrl()%>');">
+								 	<img title="Show Section in Extraction Interface" src="<%=sessionBean.getApplicationBean().getShowImage()%>">
+								</a>
+								
+							</td>
+							
+							
 							<td><%=content.getPage() %></td>
 							<td class="content"><%=content.getContent()%></td>
 							<td id="content_<%=content.getId() %>">
@@ -783,6 +796,7 @@
 								
 							</td>
 							
+						
 						</tr>
 						<%
 							}
--- a/src/main/webapp/pages/home.jsp	Tue Feb 16 15:14:18 2016 +0100
+++ b/src/main/webapp/pages/home.jsp	Wed Feb 17 14:58:19 2016 +0100
@@ -461,7 +461,7 @@
 							</td>
 							<td><%=branch.getFomattedLastChange() %></td>
 							<td>
-								<a onclick="branchInExtractionInterface('<%=branch.getId() %>', '<%=branch.getCurrentLastFileId() %>', '<%=branch.getSectionId() %>', '<%=branch.getSection().getName() %>', '<%=branch.getBook().getId() %>', '<%=branch.getBook().getName() %>', '<%=sessionBean.getUser().getId() %>', '<%=sessionBean.getApplicationBean().getExtractionInterfaceUrl()%>');">
+								<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().getShowImage()%>"/>
 								</a>
 							</td>
--- a/src/main/webapp/pages/search.jsp	Tue Feb 16 15:14:18 2016 +0100
+++ b/src/main/webapp/pages/search.jsp	Wed Feb 17 14:58:19 2016 +0100
@@ -511,7 +511,8 @@
 									<td>
 										<a href="#"
 											title="Show Section in Extraction Interface"
-										 	onclick="sectionInExtractionInterface('<%=section.getId() %>', '<%=section.getName() %>', '<%=section.getBook().getId() %>', '<%=section.getBook().getName() %>', '<%=sessionBean.getUser().getId() %>', '<%=sessionBean.getApplicationBean().getExtractionInterfaceUrl()%>');">
+										 	onclick="sectionInExtractionInterface('<%=section.getId() %>', '<%=section.getName() %>', '<%=section.getBook().getId() %>', '<%=section.getBook().getName() %>', '<%=sessionBean.getTopicListPage().getCompleteTopicList().get(0).getId() %>', '<%=sessionBean.getUser().getId() %>','<%=sessionBean.getApplicationBean().getExtractionInterfaceUrl()%>');">
+										 	
 										 	<img title="Show Section in Extraction Interface" src="<%=sessionBean.getApplicationBean().getShowImage()%>">
 										</a>