Merge of the NewUI changes into the trunk
This commit is contained in:
@@ -15,286 +15,332 @@
|
||||
|
||||
Contributor(s):
|
||||
--%>
|
||||
<%@ page import = "java.util.*" %>
|
||||
<%@ page import = "com.silverwrist.util.StringUtil" %>
|
||||
<%@ page import = "java.util.Iterator" %>
|
||||
<%@ page import = "java.util.List" %>
|
||||
<%@ page import = "com.silverwrist.venice.core.*" %>
|
||||
<%@ page import = "com.silverwrist.venice.servlets.Variables" %>
|
||||
<%@ page import = "com.silverwrist.venice.servlets.format.*" %>
|
||||
<%@ page import = "com.silverwrist.venice.ui.view.FindView" %>
|
||||
<%@ taglib uri="/tlds/util" prefix="util" %>
|
||||
<%
|
||||
FindData data = FindData.retrieve(request);
|
||||
Variables.failIfNull(data);
|
||||
RenderData rdat = RenderConfig.createRenderData(application,request,response);
|
||||
FindView data = FindView.get(request);
|
||||
%>
|
||||
<% data.writeHeader(rdat,out); %>
|
||||
<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 %>
|
||||
<% 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 %>
|
||||
<% 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>
|
||||
|
||||
<%-- Display the search form --%>
|
||||
<% if (rdat.useHTMLComments()) { %><!-- Find Form --><% } %>
|
||||
<FORM METHOD="POST" ACTION="<%= rdat.getEncodedServletPath("find") %>"><DIV CLASS="content">
|
||||
<INPUT TYPE=HIDDEN NAME="disp" VALUE="<%= data.getDisplayOption() %>">
|
||||
<util:comment>Find form</util:comment>
|
||||
<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">
|
||||
<% if (data.getDisplayOption()==FindData.FD_POSTS) { %>
|
||||
<% if (rdat.useHTMLComments()) { %><!-- Find Posts Form --><% } %>
|
||||
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,4) %><B>Find Posts:</B></FONT><BR>
|
||||
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>
|
||||
Keywords:
|
||||
<SPAN CLASS="cinput"><INPUT TYPE=TEXT CLASS="cinput" NAME="term" SIZE=64 MAXLENGTH=255
|
||||
VALUE="<%= data.getSearchTerm() %>"></SPAN>
|
||||
</FONT><BR>
|
||||
<% if (data.testDisplayMode(FindView.FD_POSTS)) { %>
|
||||
<util:comment>Find Posts form</util:comment>
|
||||
<util:font color="content.fg" size="content-heading"><B>Find Posts:</B></util:font>
|
||||
<util:font color="content.fg" size="content">
|
||||
Keywords: <SPAN CLASS="cinput"><INPUT TYPE=TEXT CLASS="cinput" NAME="term" SIZE=64 MAXLENGTH=255
|
||||
VALUE="<%= data.getTerm() %>"></SPAN>
|
||||
</util:font><BR>
|
||||
<% } else { %>
|
||||
<% if (data.getDisplayOption()==FindData.FD_COMMUNITIES) { %>
|
||||
<% if (rdat.useHTMLComments()) { %><!-- Find Communities Form --><% } %>
|
||||
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,4) %><B>Find Communities:</B></FONT><BR>
|
||||
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>
|
||||
<% if (data.testDisplayMode(FindView.FD_COMMUNITIES)) { %>
|
||||
<util:comment>Find Communities form</util:comment>
|
||||
<util:font color="content.fg" size="content-heading"><B>Find Communities:</B></util:font>
|
||||
<util:font color="content.fg" size="content">
|
||||
Display all communities whose
|
||||
<SELECT NAME="field" SIZE=1>
|
||||
<OPTION VALUE="<%= SearchMode.FIELD_COMMUNITY_NAME %>"
|
||||
<% if (data.searchFieldIs(SearchMode.FIELD_COMMUNITY_NAME)) { %>SELECTED<% } %> >name</OPTION>
|
||||
<% if (data.testField(SearchMode.FIELD_COMMUNITY_NAME)) { %>SELECTED<% } %> >name</OPTION>
|
||||
<OPTION VALUE="<%= SearchMode.FIELD_COMMUNITY_SYNOPSIS %>"
|
||||
<% if (data.searchFieldIs(SearchMode.FIELD_COMMUNITY_SYNOPSIS)) { %>SELECTED<% } %> >synopsis</OPTION>
|
||||
<% if (data.testField(SearchMode.FIELD_COMMUNITY_SYNOPSIS)) { %>SELECTED<% } %> >synopsis</OPTION>
|
||||
</SELECT><BR>
|
||||
|
||||
<% } else if (data.getDisplayOption()==FindData.FD_USERS) { %>
|
||||
<% if (rdat.useHTMLComments()) { %><!-- Find Users Form --><% } %>
|
||||
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,4) %><B>Find Users:</B></FONT><BR>
|
||||
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>
|
||||
</util:font>
|
||||
<% } else if (data.testDisplayMode(FindView.FD_USERS)) { %>
|
||||
<util:comment>Find Users form</util:comment>
|
||||
<util:font color="content.fg" size="content-heading"><B>Find Users:</B></util:font>
|
||||
<util:font color="content.fg" size="content">
|
||||
Display all users whose
|
||||
<SELECT NAME="field" SIZE=1>
|
||||
<OPTION VALUE="<%= SearchMode.FIELD_USER_NAME %>"
|
||||
<% if (data.searchFieldIs(SearchMode.FIELD_USER_NAME)) { %>SELECTED<% } %> >user name</OPTION>
|
||||
<% if (data.testField(SearchMode.FIELD_USER_NAME)) { %>SELECTED<% } %> >user name</OPTION>
|
||||
<OPTION VALUE="<%= SearchMode.FIELD_USER_DESCRIPTION %>"
|
||||
<% if (data.searchFieldIs(SearchMode.FIELD_USER_DESCRIPTION)) { %>SELECTED<% } %> >description</OPTION>
|
||||
<% if (data.testField(SearchMode.FIELD_USER_DESCRIPTION)) { %>SELECTED<% } %> >description</OPTION>
|
||||
<OPTION VALUE="<%= SearchMode.FIELD_USER_GIVEN_NAME %>"
|
||||
<% if (data.searchFieldIs(SearchMode.FIELD_USER_GIVEN_NAME)) { %>SELECTED<% } %> >first name</OPTION>
|
||||
<% if (data.testField(SearchMode.FIELD_USER_GIVEN_NAME)) { %>SELECTED<% } %> >first name</OPTION>
|
||||
<OPTION VALUE="<%= SearchMode.FIELD_USER_FAMILY_NAME %>"
|
||||
<% if (data.searchFieldIs(SearchMode.FIELD_USER_FAMILY_NAME)) { %>SELECTED<% } %> >last name</OPTION>
|
||||
<% if (data.testField(SearchMode.FIELD_USER_FAMILY_NAME)) { %>SELECTED<% } %> >last name</OPTION>
|
||||
</SELECT><BR>
|
||||
|
||||
<% } else if (data.getDisplayOption()==FindData.FD_CATEGORIES) { %>
|
||||
<% if (rdat.useHTMLComments()) { %><!-- Find Categories Form --><% } %>
|
||||
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,4) %><B>Find Categories:</B></FONT><BR>
|
||||
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>
|
||||
</util:font>
|
||||
<% } else if (data.testDisplayMode(FindView.FD_CATEGORIES)) { %>
|
||||
<util:comment>Find Categories form</util:comment>
|
||||
<util:font color="content.fg" size="content-heading"><B>Find Categories:</B></util:font>
|
||||
<util:font color="content.fg" size="content">
|
||||
Display all categories whose name
|
||||
|
||||
</util:font>
|
||||
<% } else { %>
|
||||
<%-- shouldn't get here --%>
|
||||
<H1><FONT COLOR="red">Display parameter invalid!</FONT></H1>
|
||||
<% } // end if %>
|
||||
|
||||
<util:font color="content.fg" size="content">
|
||||
<SELECT NAME="mode" SIZE=1>
|
||||
<OPTION VALUE="<%= SearchMode.SEARCH_PREFIX %>"
|
||||
<% if (data.searchModeIs(SearchMode.SEARCH_PREFIX)) { %>SELECTED<% } %> >starts with the string</OPTION>
|
||||
<% if (data.testMode(SearchMode.SEARCH_PREFIX)) { %>SELECTED<% } %> >starts with the string</OPTION>
|
||||
<OPTION VALUE="<%= SearchMode.SEARCH_SUBSTRING %>"
|
||||
<% if (data.searchModeIs(SearchMode.SEARCH_SUBSTRING)) { %>SELECTED<% } %> >contains the string</OPTION>
|
||||
<% if (data.testMode(SearchMode.SEARCH_SUBSTRING)) { %>SELECTED<% } %> >contains the string</OPTION>
|
||||
<OPTION VALUE="<%= SearchMode.SEARCH_REGEXP %>"
|
||||
<% if (data.searchModeIs(SearchMode.SEARCH_REGEXP)) { %>SELECTED<% } %> >matches the regular
|
||||
expression</OPTION>
|
||||
<% if (data.testMode(SearchMode.SEARCH_REGEXP)) { %>SELECTED<% } %> >matches the regular
|
||||
expression</OPTION>
|
||||
</SELECT>
|
||||
<% if (data.getDisplayOption()==FindData.FD_CATEGORIES) { %><BR><% } else { %> <% } %>
|
||||
<% if (data.testDisplayMode(FindView.FD_CATEGORIES)) { %><BR><% } else { %> <% } %>
|
||||
<SPAN CLASS="cinput"><INPUT TYPE=TEXT CLASS="cinput" NAME="term" SIZE=32 MAXLENGTH=255
|
||||
VALUE="<%= data.getSearchTerm() %>"></SPAN><BR>
|
||||
|
||||
<% } // end if %>
|
||||
<INPUT TYPE=IMAGE NAME="search" SRC="<%= rdat.getFullImagePath("bn_search.gif") %>"
|
||||
ALT="Search" WIDTH=80 HEIGHT=24 BORDER=0><BR>
|
||||
</FONT>
|
||||
</DIV></FORM>
|
||||
VALUE="<%= data.getTerm() %>"></SPAN><BR>
|
||||
</util:font>
|
||||
<% } // end if %>
|
||||
<util:button id="search" type="input"/>
|
||||
</DIV></util:form>
|
||||
|
||||
<%-- Display the current category --%>
|
||||
<% String a_head, a_tail; // used for formatting category display %>
|
||||
<% CategoryDescriptor cat = data.getCategory(); %>
|
||||
<% if (cat!=null) { %>
|
||||
<% if (rdat.useHTMLComments()) { %><!-- Display Category Name --><% } %>
|
||||
<HR><%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,3) %><B>Category:
|
||||
<%
|
||||
a_head = "";
|
||||
a_tail = "";
|
||||
if (cat.getCategoryID()>=0)
|
||||
{ // assign the anchor tags
|
||||
a_head = "<A HREF=\"" + data.getCatJumpLink(rdat,-1) + "\">";
|
||||
a_tail = "</A>";
|
||||
|
||||
} // end if
|
||||
%>
|
||||
<%= a_head %>Top<%= a_tail %>
|
||||
<% if (cat.getCategoryID()>=0) { %>
|
||||
<% for (int i=0; i<cat.getNumLevels(); i++) { %>
|
||||
<%
|
||||
a_head = ": ";
|
||||
a_tail = "";
|
||||
if (i<(cat.getNumLevels()-1))
|
||||
{ // assign the anchor tags
|
||||
a_head = ": <A HREF=\"" + data.getCatJumpLink(rdat,cat.getIDAtLevel(i)) + "\">";
|
||||
a_tail = "</A>";
|
||||
|
||||
} // end if
|
||||
%>
|
||||
<%= a_head %><%= StringUtil.encodeHTML(cat.getTitleAtLevel(i)) %><%= a_tail %>
|
||||
<% } // end for %>
|
||||
<% } // end if (displaying the entire subcategory tree) %>
|
||||
<util:comment>Display Category Name</util:comment>
|
||||
<HR><util:font color="content.fg" size="subhead">
|
||||
<B>Category:
|
||||
<% 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>
|
||||
</util:xlink>
|
||||
<% } else { %>
|
||||
: <util:escape><%= cat.getTitleAtLevel(i) %></util:escape>
|
||||
<% } // end if %>
|
||||
<% } // end for %>
|
||||
<% } // end if (displaying the subcategory tree) %>
|
||||
</B><P>
|
||||
|
||||
<%-- Display the subcategory list --%>
|
||||
<% List subcats = data.getSubCategoryList(); %>
|
||||
<% List subcats = data.getSubCategories(); %>
|
||||
<% if ((subcats!=null) && (subcats.size()>0)) { %>
|
||||
<% if (rdat.useHTMLComments()) { %><!-- Display SubCategory List --><% } %>
|
||||
<util:comment>Display Subcategory List</util:comment>
|
||||
<B>Subcategories:</B><BR>
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=2>
|
||||
<% Iterator it = subcats.iterator(); %>
|
||||
<% while (it.hasNext()) { %>
|
||||
<TR VALIGN=TOP>
|
||||
<TD ALIGN=CENTER WIDTH=14>
|
||||
<IMG SRC="<%= rdat.getFullImagePath("purple-ball.gif") %>" ALT="*" WIDTH=14 HEIGHT=14 BORDER=0>
|
||||
</TD>
|
||||
<TD ALIGN=LEFT CLASS="content"><%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>
|
||||
<%
|
||||
CategoryDescriptor c = (CategoryDescriptor)(it.next());
|
||||
a_head = "<A HREF=\"" + data.getCatJumpLink(rdat,c.getLinkedCategoryID()) + "\">";
|
||||
%>
|
||||
<B><%= a_head %><%= StringUtil.encodeHTML(c.getTitleAtLevel(c.getNumLevels()-1)) %></A></B>
|
||||
<TD ALIGN=CENTER WIDTH=14><util:stdbullet/></TD>
|
||||
<TD ALIGN=LEFT CLASS="content"><util:font color="content.fg" size="content">
|
||||
<% CategoryDescriptor c = (CategoryDescriptor)(it.next()); %>
|
||||
<B><util:xlink>
|
||||
<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>
|
||||
<% if (c.isSymbolicLink()) { %><EM>@</EM><% } %>
|
||||
</FONT></TD>
|
||||
</util:font></TD>
|
||||
</TR>
|
||||
<% } // end while %>
|
||||
</TABLE>
|
||||
<% } // end if (displaying subcategory list) %>
|
||||
</FONT>
|
||||
</util:font>
|
||||
<% } // end if (category specified) %>
|
||||
|
||||
<% List results = data.getResultsList(); %>
|
||||
|
||||
<%-- Display the search results --%>
|
||||
<% List results = data.getResults(); %>
|
||||
<% if (results!=null) { %>
|
||||
<% if (rdat.useHTMLComments()) { %><!-- Display Search Results --><% } %>
|
||||
<util:comment>Display Search Results</util:comment>
|
||||
<%
|
||||
// Determine the number of results to display and whether to display a "next" button
|
||||
int dcount = results.size();
|
||||
boolean go_next = false;
|
||||
if (dcount>data.getNumResultsDisplayed())
|
||||
if (dcount>data.getMaxResults())
|
||||
{ // there's a "next"
|
||||
dcount = data.getNumResultsDisplayed();
|
||||
dcount = data.getMaxResults();
|
||||
go_next = true;
|
||||
|
||||
} // end if
|
||||
%>
|
||||
<HR>
|
||||
<TABLE WIDTH="100%" BORDER=0 ALIGN=CENTER><TR VALIGN=MIDDLE>
|
||||
<TD WIDTH="50%" ALIGN=LEFT CLASS="content"><%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,3) %>
|
||||
<TD WIDTH="50%" ALIGN=LEFT CLASS="content"><util:font color="content.fg" size="content">
|
||||
<%-- The initial search results --%>
|
||||
<B><% if (cat!=null) { %>Communities in Category<% } else { %>Search Results<% } %></B>
|
||||
<% if (data.getFindCount()>0) { %>
|
||||
(Displaying <%= data.getOffset() + 1 %>-<%= data.getOffset() + dcount %> of
|
||||
<%= data.getFindCount() %>)
|
||||
<% } else { %>(None)<% } %>
|
||||
</FONT></TD>
|
||||
</util:font></TD>
|
||||
|
||||
<TD WIDTH="50%" ALIGN=RIGHT CLASS="content">
|
||||
<% if (go_next || (data.getOffset()>0)) { %>
|
||||
<%-- The navigational form that allows us to page through the results --%>
|
||||
<% if (rdat.useHTMLComments()) { %><!-- Navigational Form --><% } %>
|
||||
<FORM METHOD="POST" ACTION="<%= rdat.getEncodedServletPath("find") %>"><DIV CLASS="content">
|
||||
<INPUT TYPE=HIDDEN NAME="disp" VALUE="<%= data.getDisplayOption() %>">
|
||||
<util:comment>Navigational form</util:comment>
|
||||
<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.getSearchField() %>">
|
||||
<INPUT TYPE=HIDDEN NAME="mode" VALUE="<%= data.getSearchMode() %>">
|
||||
<INPUT TYPE=HIDDEN NAME="term" VALUE="<%= data.getSearchTerm() %>">
|
||||
<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() %>">
|
||||
<% if (data.getOffset()>0) { %>
|
||||
<INPUT TYPE=IMAGE NAME="previous" SRC="<%= rdat.getFullImagePath("bn_ar_previous.gif") %>"
|
||||
ALT="Previous" WIDTH=80 HEIGHT=24 BORDER=0>
|
||||
<util:button id="previous" type="input"/>
|
||||
<% } else { %>
|
||||
<IMG SRC="<%= rdat.getFullImagePath("bn_transparent.gif") %>" WIDTH=80 HEIGHT=24 BORDER=0>
|
||||
<util:button id="_null_"/>
|
||||
<% } // end if %>
|
||||
|
||||
<% if (go_next) { %>
|
||||
<INPUT TYPE=IMAGE NAME="next" SRC="<%= rdat.getFullImagePath("bn_ar_next.gif") %>"
|
||||
ALT="Next" WIDTH=80 HEIGHT=24 BORDER=0>
|
||||
<util:button id="next" type="input"/>
|
||||
<% } else { %>
|
||||
<IMG SRC="<%= rdat.getFullImagePath("bn_transparent.gif") %>" WIDTH=80 HEIGHT=24 BORDER=0>
|
||||
<util:button id="_null_"/>
|
||||
<% } // end if %>
|
||||
|
||||
</DIV></FORM>
|
||||
</DIV></util:form>
|
||||
<% } else { %> <% } %>
|
||||
</TD>
|
||||
</TR></TABLE><BR>
|
||||
|
||||
<%-- Display the results of the search --%>
|
||||
<TABLE BORDER=0 ALIGN=LEFT CELLPADDING=0 CELLSPACING=6>
|
||||
<% if ((data.getDisplayOption()==FindData.FD_POSTS) && (results.size()>0)) { %>
|
||||
<TABLE BORDER=0 ALIGN=LEFT CELLPADDING=0 CELLSPACING=4>
|
||||
<% if (data.testDisplayMode(FindView.FD_POSTS) && (dcount>0)) { %>
|
||||
<TR VALIGN=TOP>
|
||||
<TH ALIGN=LEFT CLASS="CONTENT">
|
||||
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %><B><U>Post Link</U></B></FONT>
|
||||
<util:font color="content.fg" size="content"><B><U>Post Link</U></B></util:font>
|
||||
</TH>
|
||||
<TH ALIGN=LEFT CLASS="CONTENT">
|
||||
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %><B><U>Author</U></B></FONT>
|
||||
<util:font color="content.fg" size="content"><B><U>Author</U></B></util:font>
|
||||
</TH>
|
||||
<TH ALIGN=LEFT CLASS="CONTENT">
|
||||
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %><B><U>Post Date</U></B></FONT>
|
||||
<util:font color="content.fg" size="content"><B><U>Post Date</U></B></util:font>
|
||||
</TH>
|
||||
<TH ALIGN=LEFT CLASS="CONTENT">
|
||||
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %><B><U>Lines</U></B></FONT>
|
||||
<util:font color="content.fg" size="content"><B><U>Lines</U></B></util:font>
|
||||
</TH>
|
||||
<TH ALIGN=LEFT CLASS="CONTENT"> </TH>
|
||||
</TR>
|
||||
<% } // end if %>
|
||||
<% for (int i=0; i<dcount; i++) { %>
|
||||
<TR VALIGN=TOP>
|
||||
<% if (data.getDisplayOption()==FindData.FD_POSTS) { %>
|
||||
<% if (data.testDisplayMode(FindView.FD_POSTS)) { %>
|
||||
<% TopicMessageFound post = (TopicMessageFound)(results.get(i)); %>
|
||||
<TD ALIGN=LEFT CLASS="content"><%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>
|
||||
<A HREF="<%= rdat.getEncodedServletPath("go/" + post.getIdentifier()) %>"><%= post.getIdentifier() %></A>
|
||||
</FONT></TD>
|
||||
<TD ALIGN=LEFT CLASS="content"><%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>
|
||||
<A HREF="<%= rdat.getEncodedServletPath("user/" + post.getAuthor()) %>"><%= post.getAuthor() %></A>
|
||||
</FONT></TD>
|
||||
<TD ALIGN=LEFT CLASS="content" NOWRAP><%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>
|
||||
<%= rdat.formatDateForDisplay(post.getPostDate()) %>
|
||||
</FONT></TD>
|
||||
<TD ALIGN=LEFT CLASS="content"><%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>
|
||||
<TD ALIGN=LEFT CLASS="content"><util:font color="content.fg" size="content">
|
||||
<util:xlink>
|
||||
<util:href type="servlet">go/<%= post.getIdentifier() %></util:href>
|
||||
<util:text><%= post.getIdentifier() %></util:text>
|
||||
</util:xlink>
|
||||
</util:font></TD>
|
||||
<TD ALIGN=LEFT CLASS="content"><util:font color="content.fg" size="content">
|
||||
<util:xlink>
|
||||
<util:href type="servlet">user/<%= post.getAuthor() %></util:href>
|
||||
<util:text><%= post.getAuthor() %></util:text>
|
||||
</util:xlink>
|
||||
</util:font></TD>
|
||||
<TD ALIGN=LEFT CLASS="content" NOWRAP><util:font color="content.fg" size="content">
|
||||
<%= data.formatDate(post.getPostDate()) %>
|
||||
</util:font></TD>
|
||||
<TD ALIGN=LEFT CLASS="content"><util:font color="content.fg" size="content">
|
||||
<%= post.getLineCount() %>
|
||||
</FONT></TD>
|
||||
<TD ALIGN=LEFT CLASS="content"><%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>
|
||||
<%= StringUtil.encodeHTML(post.getText()) %>
|
||||
</FONT></TD>
|
||||
</util:font></TD>
|
||||
<TD ALIGN=LEFT CLASS="content"><util:font color="content.fg" size="content">
|
||||
<util:escape><%= post.getText() %></util:escape>
|
||||
</util:font></TD>
|
||||
<% } else { %>
|
||||
<TD ALIGN=CENTER WIDTH=14>
|
||||
<IMG SRC="<%= rdat.getFullImagePath("purple-ball.gif") %>" ALT="*" WIDTH=14 HEIGHT=14 BORDER=0>
|
||||
</TD>
|
||||
<TD ALIGN=LEFT CLASS="content"><%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>
|
||||
<TD ALIGN=CENTER WIDTH=14><util:stdbullet/></TD>
|
||||
<TD ALIGN=LEFT CLASS="content"><util:font color="content.fg" size="content">
|
||||
<% Object item = results.get(i); %>
|
||||
<% if (data.getDisplayOption()==FindData.FD_COMMUNITIES) { %>
|
||||
<% if (data.testDisplayMode(FindView.FD_COMMUNITIES)) { %>
|
||||
<%
|
||||
CommunityContext comm = (CommunityContext)item;
|
||||
String host_name = FindData.getCommunityHostName(comm);
|
||||
int members = FindData.getCommunityMemberCount(comm);
|
||||
String host_name = FindView.getCommunityHostName(comm);
|
||||
int members = FindView.getCommunityMemberCount(comm);
|
||||
%>
|
||||
<A HREF="<%= rdat.getEncodedServletPath("sig/" + comm.getAlias()) %>"><%= StringUtil.encodeHTML(comm.getName()) %></A><BR>
|
||||
<util:xlink>
|
||||
<util:href type="servlet">sig/<%= comm.getAlias() %></util:href>
|
||||
<util:text><util:escape><%= comm.getName() %></util:escape></util:text>
|
||||
</util:xlink><BR>
|
||||
<% if (host_name!=null) { %>
|
||||
Host: <A HREF="<%= rdat.getEncodedServletPath("user/" + host_name) %>"><%= host_name %></A>
|
||||
Host:
|
||||
<util:xlink>
|
||||
<util:href type="servlet">user/<%= host_name %></util:href>
|
||||
<util:text><%= host_name %></util:text>
|
||||
</util:xlink>
|
||||
<% } // end if (got host name) %>
|
||||
<% if (members>=0) { %>
|
||||
<% if (host_name!=null) { %> - <% } %>
|
||||
<%= members %> members
|
||||
<% } // end if (got member count) %>
|
||||
<% if ((host_name!=null) || (members>=0)) { %><BR><% } %>
|
||||
Latest activity: <%= FindData.getActivityString(comm,rdat) %><BR>
|
||||
<EM><%= StringUtil.encodeHTML(comm.getSynopsis()) %></EM>
|
||||
|
||||
<% } else if (data.getDisplayOption()==FindData.FD_USERS) { %>
|
||||
Latest activity: <%= data.getActivityString(comm.getLastAccessDate()) %><BR>
|
||||
<EM><util:escape><%= comm.getSynopsis() %></util:escape></EM>
|
||||
<% } else if (data.testDisplayMode(FindView.FD_USERS)) { %>
|
||||
<% UserFound uf = (UserFound)item; %>
|
||||
<A HREF="<%= rdat.getEncodedServletPath("user/" + uf.getName()) %>"><%= uf.getName() %></A><BR>
|
||||
<%= StringUtil.encodeHTML(uf.getGivenName()) %> <%= StringUtil.encodeHTML(uf.getFamilyName()) %>,
|
||||
from <%= StringUtil.encodeHTML(uf.getLocality()) %>, <%= StringUtil.encodeHTML(uf.getRegion()) %>
|
||||
<%= uf.getCountry() %>
|
||||
<% if (uf.getDescription()!=null) { %><BR><EM><%= StringUtil.encodeHTML(uf.getDescription()) %></EM><% } %>
|
||||
|
||||
<% } else if (data.getDisplayOption()==FindData.FD_CATEGORIES) { %>
|
||||
<util:xlink>
|
||||
<util:href type="servlet">user/<%= uf.getName() %></util:href>
|
||||
<util:text><%= uf.getName() %></util:text>
|
||||
</util:xlink><BR>
|
||||
<util:escape><%= uf.getGivenName() %></util:escape>
|
||||
<util:escape><%= uf.getFamilyName() %></util:escape>,
|
||||
from <util:escape><%= uf.getLocality() %></util:escape>,
|
||||
<util:escape><%= uf.getRegion() %></util:escape> <%= uf.getCountry() %>
|
||||
<% if (uf.getDescription()!=null) { %>
|
||||
<BR><EM><util:escape><%= uf.getDescription() %></util:escape></EM>
|
||||
<% } // end if %>
|
||||
<% } else if (data.testDisplayMode(FindView.FD_CATEGORIES)) { %>
|
||||
<% CategoryDescriptor cd = (CategoryDescriptor)item; %>
|
||||
<A HREF="<%= data.getCatJumpLink(rdat,cd.getLinkedCategoryID()) %>"><%= StringUtil.encodeHTML(cd.toString()) %></A>
|
||||
|
||||
<% } // end if%>
|
||||
</FONT></TD>
|
||||
<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>
|
||||
<% } // end if %>
|
||||
</util:font></TD>
|
||||
<% } // end if %>
|
||||
</TR>
|
||||
<% } // end for %>
|
||||
|
||||
</TABLE><BR CLEAR=LEFT>
|
||||
<% } // end if (results found) %>
|
||||
|
||||
Reference in New Issue
Block a user