with one switch, a system administrator can now disable the category support
(no searching for categories, no getting communities by category, no category display on community profile, no changing a community's category)
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
|
||||
for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
|
||||
Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
|
||||
Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
--%>
|
||||
@@ -20,6 +20,7 @@
|
||||
<%@ page import = "com.silverwrist.venice.ui.view.FindView" %>
|
||||
<%@ page import = "com.silverwrist.venice.ui.view.JSPView" %>
|
||||
<%@ taglib uri="/tlds/util" prefix="util" %>
|
||||
<%@ taglib uri="/tlds/global" prefix="global" %>
|
||||
<%@ taglib uri="/tlds/user" prefix="user" %>
|
||||
<%@ taglib uri="/tlds/community" prefix="comm" %>
|
||||
<%
|
||||
@@ -66,17 +67,23 @@
|
||||
</util:font></TD>
|
||||
|
||||
<TD ALIGN=LEFT CLASS="content"><util:font color="content.fg" size="content">
|
||||
<comm:is_public><B><U>Public Community</U></B><BR></comm:is_public>
|
||||
<comm:is_private><B><U>Private Community</U></B><BR></comm:is_private>
|
||||
<B>Category:</B>
|
||||
<% CategoryDescriptor cat = (CategoryDescriptor)(view.getRequestAttribute("category")); %>
|
||||
<% for (int i=0; i<cat.getNumLevels(); i++) { %>
|
||||
<% if (i>0) { %>: <% } %>
|
||||
<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>
|
||||
<% } // end for %><P>
|
||||
<comm:is_public><B><U>Public Community</U></B></comm:is_public>
|
||||
<comm:is_private><B><U>Private Community</U></B></comm:is_private>
|
||||
<global:categories_enabled>
|
||||
<BR>
|
||||
<B>Category:</B>
|
||||
<% CategoryDescriptor cat = (CategoryDescriptor)(view.getRequestAttribute("category")); %>
|
||||
<% for (int i=0; i<cat.getNumLevels(); i++) { %>
|
||||
<% if (i>0) { %>: <% } %>
|
||||
<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>
|
||||
<% } // end for %>
|
||||
</global:categories_enabled>
|
||||
<P>
|
||||
|
||||
<EM><util:escape><comm:synopsis/></util:escape></EM><P>
|
||||
<% UserProfile prof = (UserProfile)(view.getRequestAttribute("host.profile")); %>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
|
||||
for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
|
||||
Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
|
||||
Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
--%>
|
||||
@@ -20,8 +20,10 @@
|
||||
<%@ page import = "com.silverwrist.venice.core.*" %>
|
||||
<%@ page import = "com.silverwrist.venice.ui.view.FindView" %>
|
||||
<%@ taglib uri="/tlds/util" prefix="util" %>
|
||||
<%@ taglib uri="/tlds/global" prefix="global" %>
|
||||
<%
|
||||
FindView data = FindView.get(request);
|
||||
CategoryDescriptor cat = null;
|
||||
%>
|
||||
<util:comment>Find page</util:comment>
|
||||
<util:menuheader caption="Find:">
|
||||
@@ -47,17 +49,19 @@
|
||||
<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 %>
|
||||
<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>
|
||||
<% if (data.testDisplayMode(FindView.FD_POSTS)) { %>
|
||||
<util:menuheaderitem selected="true">
|
||||
<util:href type="servlet">find.js.vs?disp=<%= FindView.FD_POSTS %></util:href>
|
||||
@@ -113,11 +117,17 @@
|
||||
</SELECT><BR>
|
||||
</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>
|
||||
<global:categories_enabled>
|
||||
<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>
|
||||
</global:categories_enabled>
|
||||
<global:categories_disabled>
|
||||
<%-- shouldn't get here --%>
|
||||
<H1><FONT COLOR="red">Display parameter invalid!</FONT></H1>
|
||||
</global:categories_disabled>
|
||||
<% } else { %>
|
||||
<%-- shouldn't get here --%>
|
||||
<H1><FONT COLOR="red">Display parameter invalid!</FONT></H1>
|
||||
@@ -141,56 +151,64 @@
|
||||
</DIV></util:form>
|
||||
|
||||
<%-- Display the current category --%>
|
||||
<% CategoryDescriptor cat = data.getCategory(); %>
|
||||
<% if (cat!=null) { %>
|
||||
<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.getSubCategories(); %>
|
||||
<% if ((subcats!=null) && (subcats.size()>0)) { %>
|
||||
<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><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>
|
||||
<global:categories_enabled>
|
||||
<% cat = data.getCategory(); %>
|
||||
<% if (cat!=null) { %>
|
||||
<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>
|
||||
<% if (c.isSymbolicLink()) { %><EM>@</EM><% } %>
|
||||
</util:font></TD>
|
||||
</TR>
|
||||
<% } // end while %>
|
||||
</TABLE>
|
||||
<% } // end if (displaying subcategory list) %>
|
||||
</util:font>
|
||||
<% } // end if (category specified) %>
|
||||
<% } 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.getSubCategories(); %>
|
||||
<% if ((subcats!=null) && (subcats.size()>0)) { %>
|
||||
<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><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><% } %>
|
||||
</util:font></TD>
|
||||
</TR>
|
||||
<% } // end while %>
|
||||
</TABLE>
|
||||
<% } // end if (displaying subcategory list) %>
|
||||
</util:font>
|
||||
<% } // end if (category specified) %>
|
||||
</global:categories_enabled>
|
||||
|
||||
<%-- Display the search results --%>
|
||||
<% List results = data.getResults(); %>
|
||||
@@ -332,11 +350,15 @@
|
||||
<BR><EM><util:escape><%= uf.getDescription() %></util:escape></EM>
|
||||
<% } // end if %>
|
||||
<% } else if (data.testDisplayMode(FindView.FD_CATEGORIES)) { %>
|
||||
<% 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>
|
||||
<% 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>
|
||||
<% } // end if %>
|
||||
</util:font></TD>
|
||||
<% } // end if %>
|
||||
|
||||
Reference in New Issue
Block a user