2001-01-31 13:55:37 -07:00
|
|
|
<%--
|
|
|
|
The contents of this file are subject to the Mozilla Public License Version 1.1
|
|
|
|
(the "License"); you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
|
|
|
|
|
|
|
|
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
|
|
|
|
WARRANTY OF ANY KIND, either express or implied. See the License for the specific
|
|
|
|
language governing rights and limitations under the License.
|
|
|
|
|
2001-02-10 00:20:27 -07:00
|
|
|
The Original Code is the Venice Web Communities System.
|
2001-01-31 13:55:37 -07:00
|
|
|
|
2004-07-10 16:54:15 -06:00
|
|
|
The Initial Developer of the Original Code is Eric J. Bowersox <erbo@ricochet.com>,
|
2001-01-31 13:55:37 -07:00
|
|
|
for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
|
2004-07-10 16:54:15 -06:00
|
|
|
Copyright (C) 2001-2004 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
|
2001-01-31 13:55:37 -07:00
|
|
|
|
|
|
|
Contributor(s):
|
|
|
|
--%>
|
2002-01-06 19:05:37 -07:00
|
|
|
<%@ page import = "java.util.Iterator" %>
|
|
|
|
<%@ page import = "java.util.List" %>
|
2004-07-10 16:54:15 -06:00
|
|
|
<%@ page import = "com.silverwrist.util.*" %>
|
2001-01-31 13:55:37 -07:00
|
|
|
<%@ page import = "com.silverwrist.venice.core.*" %>
|
2002-01-06 19:05:37 -07:00
|
|
|
<%@ page import = "com.silverwrist.venice.ui.view.FindView" %>
|
|
|
|
<%@ taglib uri="/tlds/util" prefix="util" %>
|
2002-01-16 14:17:05 -07:00
|
|
|
<%@ taglib uri="/tlds/global" prefix="global" %>
|
2001-01-31 13:55:37 -07:00
|
|
|
<%
|
2002-01-06 19:05:37 -07:00
|
|
|
FindView data = FindView.get(request);
|
2002-01-16 14:17:05 -07:00
|
|
|
CategoryDescriptor cat = null;
|
2001-01-31 13:55:37 -07:00
|
|
|
%>
|
2002-01-06 19:05:37 -07:00
|
|
|
<util:comment>Find page</util:comment>
|
|
|
|
<util:menuheader caption="Find:">
|
|
|
|
<% if (data.testDisplayMode(FindView.FD_COMMUNITIES)) { %>
|
|
|
|
<util:menuheaderitem selected="true">
|
|
|
|
<util:href type="servlet">find.js.vs?disp=<%= FindView.FD_COMMUNITIES %></util:href>
|
|
|
|
<util:text>Communities</util:text>
|
|
|
|
</util:menuheaderitem>
|
|
|
|
<% } else { %>
|
|
|
|
<util:menuheaderitem>
|
|
|
|
<util:href type="servlet">find.js.vs?disp=<%= FindView.FD_COMMUNITIES %></util:href>
|
|
|
|
<util:text>Communities</util:text>
|
|
|
|
</util:menuheaderitem>
|
|
|
|
<% } // end if %>
|
|
|
|
<% if (data.testDisplayMode(FindView.FD_USERS)) { %>
|
|
|
|
<util:menuheaderitem selected="true">
|
|
|
|
<util:href type="servlet">find.js.vs?disp=<%= FindView.FD_USERS %></util:href>
|
|
|
|
<util:text>Users</util:text>
|
|
|
|
</util:menuheaderitem>
|
|
|
|
<% } else { %>
|
|
|
|
<util:menuheaderitem>
|
|
|
|
<util:href type="servlet">find.js.vs?disp=<%= FindView.FD_USERS %></util:href>
|
|
|
|
<util:text>Users</util:text>
|
|
|
|
</util:menuheaderitem>
|
|
|
|
<% } // end if %>
|
2002-01-16 14:17:05 -07:00
|
|
|
<global:categories_enabled>
|
|
|
|
<% if (data.testDisplayMode(FindView.FD_CATEGORIES)) { %>
|
|
|
|
<util:menuheaderitem selected="true">
|
|
|
|
<util:href type="servlet">find.js.vs?disp=<%= FindView.FD_CATEGORIES %></util:href>
|
|
|
|
<util:text>Categories</util:text>
|
|
|
|
</util:menuheaderitem>
|
|
|
|
<% } else { %>
|
|
|
|
<util:menuheaderitem>
|
|
|
|
<util:href type="servlet">find.js.vs?disp=<%= FindView.FD_CATEGORIES %></util:href>
|
|
|
|
<util:text>Categories</util:text>
|
|
|
|
</util:menuheaderitem>
|
|
|
|
<% } // end if %>
|
|
|
|
</global:categories_enabled>
|
2002-01-06 19:05:37 -07:00
|
|
|
<% if (data.testDisplayMode(FindView.FD_POSTS)) { %>
|
|
|
|
<util:menuheaderitem selected="true">
|
|
|
|
<util:href type="servlet">find.js.vs?disp=<%= FindView.FD_POSTS %></util:href>
|
|
|
|
<util:text>Posts</util:text>
|
|
|
|
</util:menuheaderitem>
|
|
|
|
<% } else { %>
|
|
|
|
<util:menuheaderitem>
|
|
|
|
<util:href type="servlet">find.js.vs?disp=<%= FindView.FD_POSTS %></util:href>
|
|
|
|
<util:text>Posts</util:text>
|
|
|
|
</util:menuheaderitem>
|
|
|
|
<% } // end if %>
|
|
|
|
</util:menuheader>
|
2001-01-31 13:55:37 -07:00
|
|
|
|
|
|
|
<%-- Display the search form --%>
|
2002-01-06 19:05:37 -07:00
|
|
|
<util:comment>Find form</util:comment>
|
2004-07-10 16:54:15 -06:00
|
|
|
<util:form action="find.js.vs" type="servlet"><div class="content">
|
|
|
|
<input type="hidden" name="disp" value="<%= data.getDisplayMode() %>" />
|
|
|
|
<input type="hidden" name="ofs" VALUE="0" />
|
2002-01-06 19:05:37 -07:00
|
|
|
<% if (data.testDisplayMode(FindView.FD_POSTS)) { %>
|
|
|
|
<util:comment>Find Posts form</util:comment>
|
2004-07-10 16:54:15 -06:00
|
|
|
<util:font color="content.fg" size="content-heading"><b>Find Posts:</b></util:font>
|
2002-01-06 19:05:37 -07:00
|
|
|
<util:font color="content.fg" size="content">
|
2004-07-10 16:54:15 -06:00
|
|
|
Keywords: <span class="cinput"><input type="text" class="cinput" name="term" size="64" maxlength="255"
|
|
|
|
value="<%= data.getTerm() %>" /></span>
|
|
|
|
</util:font><br />
|
2001-11-19 02:16:11 -07:00
|
|
|
<% } else { %>
|
2002-01-06 19:05:37 -07:00
|
|
|
<% if (data.testDisplayMode(FindView.FD_COMMUNITIES)) { %>
|
|
|
|
<util:comment>Find Communities form</util:comment>
|
2004-07-10 16:54:15 -06:00
|
|
|
<util:font color="content.fg" size="content-heading"><b>Find Communities:</b></util:font>
|
2002-01-06 19:05:37 -07:00
|
|
|
<util:font color="content.fg" size="content">
|
2001-12-07 22:02:00 -07:00
|
|
|
Display all communities whose
|
2004-07-10 16:54:15 -06:00
|
|
|
<select name="field" size="1">
|
|
|
|
<option value="<%= SearchMode.FIELD_COMMUNITY_NAME %>"
|
|
|
|
<% if (data.testField(SearchMode.FIELD_COMMUNITY_NAME)) { %>selected="selected"<% } %> >name</option>
|
|
|
|
<option value="<%= SearchMode.FIELD_COMMUNITY_SYNOPSIS %>"
|
|
|
|
<% if (data.testField(SearchMode.FIELD_COMMUNITY_SYNOPSIS)) { %>selected="selected"<% } %>
|
|
|
|
>synopsis</option>
|
|
|
|
</select><br />
|
2002-01-06 19:05:37 -07:00
|
|
|
</util:font>
|
|
|
|
<% } else if (data.testDisplayMode(FindView.FD_USERS)) { %>
|
|
|
|
<util:comment>Find Users form</util:comment>
|
2004-07-10 16:54:15 -06:00
|
|
|
<util:font color="content.fg" size="content-heading"><b>Find Users:</b></util:font>
|
2002-01-06 19:05:37 -07:00
|
|
|
<util:font color="content.fg" size="content">
|
2001-12-07 22:02:00 -07:00
|
|
|
Display all users whose
|
2004-07-10 16:54:15 -06:00
|
|
|
<select name="field" size="1">
|
|
|
|
<option value="<%= SearchMode.FIELD_USER_NAME %>"
|
|
|
|
<% if (data.testField(SearchMode.FIELD_USER_NAME)) { %>selected="selected"<% } %> >user name</option>
|
|
|
|
<option value="<%= SearchMode.FIELD_USER_DESCRIPTION %>"
|
|
|
|
<% if (data.testField(SearchMode.FIELD_USER_DESCRIPTION)) { %>selected="selected"<% } %>
|
|
|
|
>description</option>
|
|
|
|
<option value="<%= SearchMode.FIELD_USER_GIVEN_NAME %>"
|
|
|
|
<% if (data.testField(SearchMode.FIELD_USER_GIVEN_NAME)) { %>selected="selected"<% } %> >first
|
|
|
|
name</option>
|
|
|
|
<option value="<%= SearchMode.FIELD_USER_FAMILY_NAME %>"
|
|
|
|
<% if (data.testField(SearchMode.FIELD_USER_FAMILY_NAME)) { %>selected="selected"<% } %> >last
|
|
|
|
name</option>
|
|
|
|
</select><br />
|
2002-01-06 19:05:37 -07:00
|
|
|
</util:font>
|
|
|
|
<% } else if (data.testDisplayMode(FindView.FD_CATEGORIES)) { %>
|
2002-01-16 14:17:05 -07:00
|
|
|
<global:categories_enabled>
|
|
|
|
<util:comment>Find Categories form</util:comment>
|
2004-07-10 16:54:15 -06:00
|
|
|
<util:font color="content.fg" size="content-heading"><b>Find Categories:</b></util:font>
|
2002-01-16 14:17:05 -07:00
|
|
|
<util:font color="content.fg" size="content">
|
|
|
|
Display all categories whose name
|
|
|
|
</util:font>
|
|
|
|
</global:categories_enabled>
|
|
|
|
<global:categories_disabled>
|
|
|
|
<%-- shouldn't get here --%>
|
2004-07-10 16:54:15 -06:00
|
|
|
<h1><font color="red">Display parameter invalid!</font></h1>
|
2002-01-16 14:17:05 -07:00
|
|
|
</global:categories_disabled>
|
2001-12-07 22:02:00 -07:00
|
|
|
<% } else { %>
|
|
|
|
<%-- shouldn't get here --%>
|
2004-07-10 16:54:15 -06:00
|
|
|
<h1><font color="red">Display parameter invalid!</font></h1>
|
2001-12-07 22:02:00 -07:00
|
|
|
<% } // end if %>
|
2002-01-06 19:05:37 -07:00
|
|
|
<util:font color="content.fg" size="content">
|
2004-07-10 16:54:15 -06:00
|
|
|
<select name="mode" size="1">
|
|
|
|
<option value="<%= SearchMode.SEARCH_PREFIX %>"
|
|
|
|
<% if (data.testMode(SearchMode.SEARCH_PREFIX)) { %>selected="selected"<% } %> >starts with the
|
|
|
|
string</option>
|
|
|
|
<option value="<%= SearchMode.SEARCH_SUBSTRING %>"
|
|
|
|
<% if (data.testMode(SearchMode.SEARCH_SUBSTRING)) { %>selected="selected"<% } %> >contains the
|
|
|
|
string</option>
|
|
|
|
<option value="<%= SearchMode.SEARCH_REGEXP %>"
|
|
|
|
<% if (data.testMode(SearchMode.SEARCH_REGEXP)) { %>selected="selected"<% } %> >matches the regular
|
|
|
|
expression</option>
|
|
|
|
</select>
|
|
|
|
<% if (data.testDisplayMode(FindView.FD_CATEGORIES)) { %><br /><% } else { %> <% } %>
|
|
|
|
<span class="cinput"><input type="text" class="cinput" name="term" size="32" maxlength="255"
|
|
|
|
value="<%= data.getTerm() %>"></span><br />
|
2002-01-06 19:05:37 -07:00
|
|
|
</util:font>
|
|
|
|
<% } // end if %>
|
|
|
|
<util:button id="search" type="input"/>
|
2004-07-10 16:54:15 -06:00
|
|
|
</div></util:form>
|
2001-01-31 13:55:37 -07:00
|
|
|
|
|
|
|
<%-- Display the current category --%>
|
2002-01-16 14:17:05 -07:00
|
|
|
<global:categories_enabled>
|
|
|
|
<% cat = data.getCategory(); %>
|
|
|
|
<% if (cat!=null) { %>
|
|
|
|
<util:comment>Display Category Name</util:comment>
|
2004-07-10 16:54:15 -06:00
|
|
|
<hr /><util:font color="content.fg" size="subhead">
|
|
|
|
<b>Category:
|
2002-01-16 14:17:05 -07:00
|
|
|
<% if (cat.getCategoryID()<0) { %>
|
|
|
|
Top
|
|
|
|
<% } else { %>
|
|
|
|
<util:xlink>
|
|
|
|
<util:href type="servlet">find.js.vs?disp=<%= FindView.FD_COMMUNITIES %></util:href>
|
|
|
|
<util:text>Top</util:text>
|
|
|
|
</util:xlink>
|
|
|
|
<% for (int i=0; i<cat.getNumLevels(); i++) { %>
|
|
|
|
<% if (i<(cat.getNumLevels()-1)) { %>
|
|
|
|
:
|
|
|
|
<util:xlink>
|
|
|
|
<util:href type="servlet">
|
|
|
|
find.js.vs?disp=<%= FindView.FD_COMMUNITIES %>&cat=<%= cat.getIDAtLevel(i) %>
|
|
|
|
</util:href>
|
|
|
|
<util:text><util:escape><%= cat.getTitleAtLevel(i) %></util:escape></util:text>
|
2002-01-06 19:05:37 -07:00
|
|
|
</util:xlink>
|
2002-01-16 14:17:05 -07:00
|
|
|
<% } else { %>
|
|
|
|
: <util:escape><%= cat.getTitleAtLevel(i) %></util:escape>
|
|
|
|
<% } // end if %>
|
|
|
|
<% } // end for %>
|
|
|
|
<% } // end if (displaying the subcategory tree) %>
|
2004-07-10 16:54:15 -06:00
|
|
|
</b><P>
|
2002-01-16 14:17:05 -07:00
|
|
|
|
|
|
|
<%-- Display the subcategory list --%>
|
|
|
|
<% List subcats = data.getSubCategories(); %>
|
|
|
|
<% if ((subcats!=null) && (subcats.size()>0)) { %>
|
|
|
|
<util:comment>Display Subcategory List</util:comment>
|
2004-07-10 16:54:15 -06:00
|
|
|
<b>Subcategories:</b><br />
|
|
|
|
<table border="0" cellpadding="0" cellspacing="2">
|
|
|
|
<% for (Iterator it = subcats.iterator(); it.hasNext(); ) { %>
|
|
|
|
<% CategoryDescriptor c = (CategoryDescriptor)(it.next()); %>
|
|
|
|
<tr valign="top">
|
|
|
|
<td align="center" width="14"><util:stdbullet/></td>
|
|
|
|
<td align="left" class="content"><util:font color="content.fg" size="content">
|
|
|
|
<b><util:xlink>
|
2002-01-16 14:17:05 -07:00
|
|
|
<util:href type="servlet">
|
|
|
|
find.js.vs?disp=<%= FindView.FD_COMMUNITIES %>&cat=<%= c.getLinkedCategoryID() %>
|
|
|
|
</util:href>
|
|
|
|
<util:text>
|
|
|
|
<util:escape><%= c.getTitleAtLevel(c.getNumLevels()-1) %></util:escape>
|
|
|
|
</util:text>
|
|
|
|
</util:xlink>
|
2004-07-10 16:54:15 -06:00
|
|
|
<% if (c.isSymbolicLink()) { %><i>@</i><% } %>
|
|
|
|
</util:font></td>
|
|
|
|
</tr>
|
|
|
|
<% } // end for %>
|
|
|
|
</table>
|
2002-01-16 14:17:05 -07:00
|
|
|
<% } // end if (displaying subcategory list) %>
|
|
|
|
</util:font>
|
|
|
|
<% } // end if (category specified) %>
|
|
|
|
</global:categories_enabled>
|
2002-01-06 19:05:37 -07:00
|
|
|
|
|
|
|
<%-- Display the search results --%>
|
|
|
|
<% List results = data.getResults(); %>
|
2001-01-31 13:55:37 -07:00
|
|
|
<% if (results!=null) { %>
|
2002-01-06 19:05:37 -07:00
|
|
|
<util:comment>Display Search Results</util:comment>
|
2001-01-31 13:55:37 -07:00
|
|
|
<%
|
|
|
|
// Determine the number of results to display and whether to display a "next" button
|
|
|
|
int dcount = results.size();
|
|
|
|
boolean go_next = false;
|
2002-01-06 19:05:37 -07:00
|
|
|
if (dcount>data.getMaxResults())
|
2001-01-31 13:55:37 -07:00
|
|
|
{ // there's a "next"
|
2002-01-06 19:05:37 -07:00
|
|
|
dcount = data.getMaxResults();
|
2001-01-31 13:55:37 -07:00
|
|
|
go_next = true;
|
|
|
|
|
|
|
|
} // end if
|
|
|
|
%>
|
2004-07-10 16:54:15 -06:00
|
|
|
<hr />
|
|
|
|
<table width="100%" border="0" align="center"><tr valign="middle">
|
|
|
|
<td width="50%" align="left" class="content"><util:font color="content.fg" size="content">
|
2001-01-31 13:55:37 -07:00
|
|
|
<%-- The initial search results --%>
|
2004-07-10 16:54:15 -06:00
|
|
|
<b><% if (cat!=null) { %>Communities in Category<% } else { %>Search Results<% } %></b>
|
2001-01-31 13:55:37 -07:00
|
|
|
<% if (data.getFindCount()>0) { %>
|
|
|
|
(Displaying <%= data.getOffset() + 1 %>-<%= data.getOffset() + dcount %> of
|
|
|
|
<%= data.getFindCount() %>)
|
|
|
|
<% } else { %>(None)<% } %>
|
2004-07-10 16:54:15 -06:00
|
|
|
</util:font></td>
|
2001-01-31 13:55:37 -07:00
|
|
|
|
2004-07-10 16:54:15 -06:00
|
|
|
<td width="50%" align="right" class="content">
|
2001-01-31 13:55:37 -07:00
|
|
|
<% if (go_next || (data.getOffset()>0)) { %>
|
|
|
|
<%-- The navigational form that allows us to page through the results --%>
|
2002-01-06 19:05:37 -07:00
|
|
|
<util:comment>Navigational form</util:comment>
|
2004-07-10 16:54:15 -06:00
|
|
|
<util:form action="find.js.vs" type="servlet"><div class="content">
|
|
|
|
<input type="hidden" name="disp" value="<%= data.getDisplayMode() %>" />
|
|
|
|
<% if (cat!=null) { %><input type="hidden" name="cat" value="<%= cat.getCategoryID() %>" /><% } %>
|
|
|
|
<input type="hidden" name="ofs" value="<%= data.getOffset() %>" />
|
|
|
|
<input type="hidden" name="field" value="<%= data.getField() %>" />
|
|
|
|
<input type="hidden" name="mode" value="<%= data.getMode() %>" />
|
|
|
|
<input type="hidden" name="term" value="<%= data.getTerm() %>" />
|
|
|
|
<input type="hidden" name="fcount" value="<%= data.getFindCount() %>" />
|
2001-01-31 13:55:37 -07:00
|
|
|
<% if (data.getOffset()>0) { %>
|
2002-01-06 19:05:37 -07:00
|
|
|
<util:button id="previous" type="input"/>
|
2001-01-31 13:55:37 -07:00
|
|
|
<% } else { %>
|
2002-01-06 19:05:37 -07:00
|
|
|
<util:button id="_null_"/>
|
2001-01-31 13:55:37 -07:00
|
|
|
<% } // end if %>
|
|
|
|
|
|
|
|
<% if (go_next) { %>
|
2002-01-06 19:05:37 -07:00
|
|
|
<util:button id="next" type="input"/>
|
2001-01-31 13:55:37 -07:00
|
|
|
<% } else { %>
|
2002-01-06 19:05:37 -07:00
|
|
|
<util:button id="_null_"/>
|
2001-01-31 13:55:37 -07:00
|
|
|
<% } // end if %>
|
2004-07-10 16:54:15 -06:00
|
|
|
</div></util:form>
|
2001-01-31 13:55:37 -07:00
|
|
|
<% } else { %> <% } %>
|
2004-07-10 16:54:15 -06:00
|
|
|
</td>
|
|
|
|
</tr></table><br />
|
2001-01-31 13:55:37 -07:00
|
|
|
|
|
|
|
<%-- Display the results of the search --%>
|
2004-07-10 16:54:15 -06:00
|
|
|
<table border="0" align="left" cellpadding="0" cellspacing="4">
|
2002-01-06 19:05:37 -07:00
|
|
|
<% if (data.testDisplayMode(FindView.FD_POSTS) && (dcount>0)) { %>
|
2004-07-10 16:54:15 -06:00
|
|
|
<tr valign="top">
|
|
|
|
<th align="left" class="content">
|
|
|
|
<util:font color="content.fg" size="content"><b><u>Post Link</u></b></util:font>
|
|
|
|
</th>
|
|
|
|
<th align="left" class="content">
|
|
|
|
<util:font color="content.fg" size="content"><b><u>Author</u></b></util:font>
|
|
|
|
</th>
|
|
|
|
<th align="left" class="content">
|
|
|
|
<util:font color="content.fg" size="content"><b><u>Post Date</u></b></util:font>
|
|
|
|
</th>
|
|
|
|
<th align="left" class="content">
|
|
|
|
<util:font color="content.fg" size="content"><b><u>Lines</u></b></util:font>
|
|
|
|
</th>
|
|
|
|
<th align="left" class="content"> </th>
|
|
|
|
</tr>
|
2001-12-07 22:02:00 -07:00
|
|
|
<% } // end if %>
|
2001-01-31 13:55:37 -07:00
|
|
|
<% for (int i=0; i<dcount; i++) { %>
|
2004-07-10 16:54:15 -06:00
|
|
|
<tr valign="top">
|
2002-01-06 19:05:37 -07:00
|
|
|
<% if (data.testDisplayMode(FindView.FD_POSTS)) { %>
|
2001-12-07 22:02:00 -07:00
|
|
|
<% TopicMessageFound post = (TopicMessageFound)(results.get(i)); %>
|
2004-07-10 16:54:15 -06:00
|
|
|
<td align="left" class="content"><util:font color="content.fg" size="content">
|
2002-01-06 19:05:37 -07:00
|
|
|
<util:xlink>
|
|
|
|
<util:href type="servlet">go/<%= post.getIdentifier() %></util:href>
|
|
|
|
<util:text><%= post.getIdentifier() %></util:text>
|
|
|
|
</util:xlink>
|
2004-07-10 16:54:15 -06:00
|
|
|
</util:font></td>
|
|
|
|
<td align="left" class="content"><util:font color="content.fg" size="content">
|
2002-01-06 19:05:37 -07:00
|
|
|
<util:xlink>
|
|
|
|
<util:href type="servlet">user/<%= post.getAuthor() %></util:href>
|
|
|
|
<util:text><%= post.getAuthor() %></util:text>
|
|
|
|
</util:xlink>
|
2004-07-10 16:54:15 -06:00
|
|
|
</util:font></td>
|
|
|
|
<td align="left" class="content" nowrap="nowrap"><util:font color="content.fg" size="content">
|
2002-01-06 19:05:37 -07:00
|
|
|
<%= data.formatDate(post.getPostDate()) %>
|
2004-07-10 16:54:15 -06:00
|
|
|
</util:font></td>
|
|
|
|
<td align="left" class="content"><util:font color="content.fg" size="content">
|
2001-12-07 22:02:00 -07:00
|
|
|
<%= post.getLineCount() %>
|
2004-07-10 16:54:15 -06:00
|
|
|
</util:font></td>
|
|
|
|
<td align="left" class="content"><util:font color="content.fg" size="content">
|
2002-01-06 19:05:37 -07:00
|
|
|
<util:escape><%= post.getText() %></util:escape>
|
2004-07-10 16:54:15 -06:00
|
|
|
</util:font></td>
|
2001-12-07 22:02:00 -07:00
|
|
|
<% } else { %>
|
2004-07-10 16:54:15 -06:00
|
|
|
<td align="center" width="14"><util:stdbullet/></td>
|
|
|
|
<td align="left" class="content"><util:font color="content.fg" size="content">
|
2001-12-07 22:02:00 -07:00
|
|
|
<% Object item = results.get(i); %>
|
2002-01-06 19:05:37 -07:00
|
|
|
<% if (data.testDisplayMode(FindView.FD_COMMUNITIES)) { %>
|
2001-12-07 22:02:00 -07:00
|
|
|
<%
|
|
|
|
CommunityContext comm = (CommunityContext)item;
|
2002-01-06 19:05:37 -07:00
|
|
|
String host_name = FindView.getCommunityHostName(comm);
|
|
|
|
int members = FindView.getCommunityMemberCount(comm);
|
2001-12-07 22:02:00 -07:00
|
|
|
%>
|
2002-01-06 19:05:37 -07:00
|
|
|
<util:xlink>
|
2004-07-10 16:54:15 -06:00
|
|
|
<util:href type="servlet">comm/<%= comm.getAlias() %></util:href>
|
2002-01-06 19:05:37 -07:00
|
|
|
<util:text><util:escape><%= comm.getName() %></util:escape></util:text>
|
2004-07-10 16:54:15 -06:00
|
|
|
</util:xlink><br />
|
2001-12-07 22:02:00 -07:00
|
|
|
<% if (host_name!=null) { %>
|
2002-01-06 19:05:37 -07:00
|
|
|
Host:
|
|
|
|
<util:xlink>
|
|
|
|
<util:href type="servlet">user/<%= host_name %></util:href>
|
|
|
|
<util:text><%= host_name %></util:text>
|
|
|
|
</util:xlink>
|
2001-12-07 22:02:00 -07:00
|
|
|
<% } // end if (got host name) %>
|
|
|
|
<% if (members>=0) { %>
|
|
|
|
<% if (host_name!=null) { %> - <% } %>
|
|
|
|
<%= members %> members
|
|
|
|
<% } // end if (got member count) %>
|
2004-07-10 16:54:15 -06:00
|
|
|
<% if ((host_name!=null) || (members>=0)) { %><br /><% } %>
|
|
|
|
Latest activity: <%= data.getActivityString(comm.getLastAccessDate()) %><br />
|
|
|
|
<i><util:escape><%= comm.getSynopsis() %></util:escape><i>
|
2002-01-06 19:05:37 -07:00
|
|
|
<% } else if (data.testDisplayMode(FindView.FD_USERS)) { %>
|
2004-07-10 16:54:15 -06:00
|
|
|
<%
|
|
|
|
UserFound uf = (UserFound)item;
|
|
|
|
String fullname = uf.getGivenName() + " " + uf.getFamilyName();
|
|
|
|
fullname = fullname.trim();
|
|
|
|
if (StringUtil.isStringEmpty(fullname))
|
|
|
|
fullname = uf.getName();
|
|
|
|
String whence = "";
|
|
|
|
if (!(StringUtil.isStringEmpty(uf.getLocality())))
|
|
|
|
{ // combine locations
|
|
|
|
if (!(StringUtil.isStringEmpty(uf.getRegion())))
|
|
|
|
whence = uf.getLocality() + ", " + uf.getRegion();
|
|
|
|
else
|
|
|
|
whence = uf.getLocality();
|
|
|
|
|
|
|
|
} // end if
|
|
|
|
else if (!(StringUtil.isStringEmpty(uf.getRegion())))
|
|
|
|
whence = uf.getRegion();
|
|
|
|
%>
|
2002-01-06 19:05:37 -07:00
|
|
|
<util:xlink>
|
|
|
|
<util:href type="servlet">user/<%= uf.getName() %></util:href>
|
|
|
|
<util:text><%= uf.getName() %></util:text>
|
2004-07-10 16:54:15 -06:00
|
|
|
</util:xlink><br />
|
|
|
|
<util:escape><%= fullname %></util:escape>,
|
|
|
|
from <util:escape><%= whence %></util:escape>
|
|
|
|
<% if (!(uf.getCountry().equals("XX"))) { %><%= uf.getCountry() %><% } %>
|
2002-01-06 19:05:37 -07:00
|
|
|
<% if (uf.getDescription()!=null) { %>
|
2004-07-10 16:54:15 -06:00
|
|
|
<br /><i><util:escape><%= uf.getDescription() %></util:escape></i>
|
2002-01-06 19:05:37 -07:00
|
|
|
<% } // end if %>
|
|
|
|
<% } else if (data.testDisplayMode(FindView.FD_CATEGORIES)) { %>
|
2002-01-16 14:17:05 -07:00
|
|
|
<global:categories_enabled>
|
|
|
|
<% CategoryDescriptor cd = (CategoryDescriptor)item; %>
|
|
|
|
<util:xlink>
|
|
|
|
<util:href type="servlet">
|
|
|
|
find.js.vs?disp=<%= FindView.FD_COMMUNITIES %>&cat=<%= cd.getLinkedCategoryID() %>
|
|
|
|
</util:href>
|
|
|
|
<util:text><util:escape><%= cd.toString() %></util:escape></util:text>
|
|
|
|
</util:xlink>
|
|
|
|
</global:categories_enabled>
|
2002-01-06 19:05:37 -07:00
|
|
|
<% } // end if %>
|
2004-07-10 16:54:15 -06:00
|
|
|
</util:font></td>
|
2001-12-07 22:02:00 -07:00
|
|
|
<% } // end if %>
|
2004-07-10 16:54:15 -06:00
|
|
|
</tr>
|
2001-01-31 13:55:37 -07:00
|
|
|
<% } // end for %>
|
2004-07-10 16:54:15 -06:00
|
|
|
</table><br clear="left" />
|
2001-01-31 13:55:37 -07:00
|
|
|
<% } // end if (results found) %>
|
2004-07-10 16:54:15 -06:00
|
|
|
<%-- EOF --%>
|