changeset 50:8f6c47775fe8

new: 'view on LGMap' shown on the existing full text searching list
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Tue, 26 Jan 2016 13:41:47 +0100
parents 7c2e1b14b77d
children cf747a960516
files src/main/java/de/mpiwg/web/jsp/ApplicationBean.java src/main/webapp/pages/fullTextSearch.jsp
diffstat 2 files changed, 22 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/web/jsp/ApplicationBean.java	Tue Jan 26 11:46:10 2016 +0100
+++ b/src/main/java/de/mpiwg/web/jsp/ApplicationBean.java	Tue Jan 26 13:41:47 2016 +0100
@@ -68,6 +68,17 @@
 		return value;	
 	}
 	
+	public String getLGMapUrl(){
+		String value = null;
+		try {
+			value = PropertiesUtils.getPropValue("lgmap");
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		return value;
+	}
+	
+	
 	public String getOkImage(){
 		return getRootServer() + "/resources/images/ok.png";
 	}
--- a/src/main/webapp/pages/fullTextSearch.jsp	Tue Jan 26 11:46:10 2016 +0100
+++ b/src/main/webapp/pages/fullTextSearch.jsp	Tue Jan 26 13:41:47 2016 +0100
@@ -141,8 +141,9 @@
 				<table class="pageTable">
 					<tr>
 						<td class="tableTitle">Table name</td>
-						<td class="tableTitle">html</td>
-						<td></td>
+						<td class="tableTitle">View html</td>
+						<td class="tableTitle"></td>
+						<td class="tableTitle">View on LGMap</td>
 					</tr>
 					
 					<% for (LGFullTextSearchFile aFile : sessionBean.getFullTextSearchPage().getFileList() ){%>
@@ -150,7 +151,7 @@
 						<td><%= aFile.getFileName() %></td>
 						<!-- getFullTextSearchFileText?fileId= &userId= -->
 						<td>
-							<!-- TODO click searching result to open it in the same table of full-text-search result -->
+							<!-- click searching result to open it in the same table of full-text-search result -->
 							<a href="<%=sessionBean.getApplicationBean().getRootServer() %>/rest/text/getFullTextSearchHtmlFile?fileId=<%= aFile.getId() %>"
 										target="_blank">
 								<img alt="Show text in html" src="<%=sessionBean.getApplicationBean().getShowImage()%>"/>	
@@ -159,6 +160,13 @@
 						<td>
 							<button type="button" class="lgButton" onclick="setAction0('loadFile', 'fullTextSearchForm', 'fileId', <%=aFile.getId() %>); document.getElementById('fullTextSearchForm').submit();">load</button>	
 						</td>
+						<td>
+							<!-- view on LGMap -->
+							<a href="<%=sessionBean.getApplicationBean().getLGMapUrl() %>&file=<%=aFile.getUserId().toString()%>_<%=aFile.getFileName()%>.csv&name=<%=aFile.getSearchTerms() %>"
+										target="_blank">
+								<img alt="View on LGMap" src="<%=sessionBean.getApplicationBean().getShowImage()%>"/>	
+							</a>
+						</td>
 					</tr>
 					<% } %>