[sword-svn] r422 - trunk/webapp

scribe at crosswire.org scribe at crosswire.org
Mon May 18 07:42:51 MST 2015


Author: scribe
Date: 2015-05-18 07:42:50 -0700 (Mon, 18 May 2015)
New Revision: 422

Modified:
   trunk/webapp/wordsearchresults.jsp
Log:
added multi-column results lists


Modified: trunk/webapp/wordsearchresults.jsp
===================================================================
--- trunk/webapp/wordsearchresults.jsp	2014-11-12 13:29:54 UTC (rev 421)
+++ trunk/webapp/wordsearchresults.jsp	2015-05-18 14:42:50 UTC (rev 422)
@@ -4,6 +4,7 @@
 	String colorKeys[] = request.getParameterValues("colorKey");
 	String colorMorph  = request.getParameter("colorMorph");
 	String resetModule = request.getParameter("mod");
+	String displayModule = request.getParameter("mod2");
 	String lastModType = (String) session.getAttribute("lastModType");
 	String activeModuleName = (resetModule != null)?resetModule : ((String) session.getAttribute(("GBS".equals(lastModType))?"gbsBook":"ActiveModule"));
 	SWModule activeModule = mgr.getModuleByName((activeModuleName == null) ? defaultBible : activeModuleName);
@@ -18,6 +19,9 @@
 		}
 	}
 	lastModType = (String) session.getAttribute("lastModType");
+	SWModule activeModule2 = ("Bible".equals(lastModType) && parDispModules.size()>0) ? mgr.getModuleByName((String)parDispModules.get(0)) : null;
+	if (activeModule2 != null && activeModule2.getName().equals(activeModule.getName())) activeModule2 = (parDispModules.size()>1) ? mgr.getModuleByName((String)parDispModules.get(1)) : null;
+	if (displayModule != null) activeModule2 = mgr.getModuleByName(displayModule);
 
 	String resetSearchTerm = request.getParameter("searchTerm");
 	if (resetSearchTerm != null) {
@@ -123,7 +127,7 @@
 
 	<tiles:put name="content" type="string">
 	<div id="searchresults">
-		<h2><t:t>Results for</t:t> <em style="<%= specialFont != null ? "font-family:"+specialFont : "" %>"><%= activeSearchTerm %></em></h2>
+		<h2><t:t>Results for</t:t>&nbsp;<em style="<%= specialFont != null ? "font-family:"+specialFont : "" %>"><%= activeSearchTerm %></em></h2>
 		<%
 			SearchHit[] results = null;
 			if ((activeSearchTerm != null) && (activeSearchTerm.trim().length() > 0)) {
@@ -161,10 +165,12 @@
 			Integer resultStart = new Integer(request.getParameter("start") != null ? request.getParameter("start") : "0");
 			Integer resultLimit = new Integer(30);
 			boolean rtol = ("RtoL".equalsIgnoreCase(activeModule.getConfigEntry("Direction")));
+			boolean showTwo =  (activeModule2 != null && activeModule2.getRenderText().trim().length() > 0);
 
 			for (int i = resultStart.intValue(); i < results.length && i < resultStart.intValue() + resultLimit.intValue(); i++)
 			{
 				activeModule.setKeyText(results[i].key);
+				if (activeModule2 != null) activeModule2.setKeyText(results[i].key);
 				String dispKey = results[i].key;
 		%>
 				<dt>
@@ -173,7 +179,18 @@
 				</dt>
 				
 				<dd dir="<%= rtol ? "rtl" : "" %>" style="<%= specialFont != null ? "font-family:"+specialFont : "" %>">
+
+<table style="width:100%;"><tbody><tr>
+<td style="width:<%=showTwo?50:100%>%;">
 					<%= activeModule.getRenderText() %>
+</td>
+<% if (showTwo) { %>
+<td style="width:50%;">
+					<%= activeModule2.getRenderText() %>
+</td>
+<% } %>
+</tr></tbody></table>
+
 				</dd>
 
 		<%




More information about the sword-cvs mailing list