added "sticky" topic facility to cause topics to always float at the top of
the topic list when it's set
This commit is contained in:
@@ -9,9 +9,9 @@
|
||||
|
||||
The Original Code is the Venice Web Communities System.
|
||||
|
||||
The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
|
||||
The Initial Developer of the Original Code is Eric J. Bowersox <erbo@ricochet.com>,
|
||||
for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
|
||||
Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
|
||||
Copyright (C) 2001-2004 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
--%>
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
<%= view.getRequestAttribute("conference.custom.top").toString() %>
|
||||
<util:font color="content.fg" size="content">
|
||||
<DIV ALIGN="LEFT" CLASS="content">
|
||||
<div align="left" class="content">
|
||||
<util:xlink>
|
||||
<util:href type="servlet">conf/conferences.js.vs?<%= base_locator %></util:href>
|
||||
<util:text><util:button id="conf_list"/></util:text>
|
||||
@@ -83,104 +83,106 @@
|
||||
<util:text><util:button id="add_to_hotlist"/></util:text>
|
||||
</util:xlink>
|
||||
</conf:can_add_to_hotlist>
|
||||
<BR>
|
||||
<br />
|
||||
<util:font color="content.fg" size="post-reference"><util:xlink>
|
||||
<util:href type="servlet"><%= view.getPageQID() %></util:href>
|
||||
<util:text>[Permalink to this conference]</util:text>
|
||||
</util:xlink></util:font>
|
||||
</DIV>
|
||||
</div>
|
||||
<% out.flush(); response.flushBuffer(); %>
|
||||
|
||||
<% final List topics = (List)(view.getRequestAttribute("topics.list")); %>
|
||||
<% if (topics.size()>0) { %>
|
||||
<TABLE WIDTH="100%" BORDER=0 CELLPADDING=0 CELLSPACING=3>
|
||||
<TR VALIGN=TOP>
|
||||
<TD ALIGN=LEFT WIDTH="1%" CLASS="content" NOWRAP><util:font color="content.fg" size="content">
|
||||
<B><util:xlink>
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="3">
|
||||
<tr valign="top">
|
||||
<td align="left" width="1%" class="content" nowrap="nowrap"><util:font color="content.fg" size="content">
|
||||
<b><util:xlink>
|
||||
<util:href type="servlet">conf/topics.js.vs?<%= base_locator %>&sort=<%= ((sort_opt==SORT_NUMBER) ? -SORT_NUMBER : SORT_NUMBER) %></util:href>
|
||||
<util:text>#</util:text>
|
||||
</util:xlink></B>
|
||||
</util:font></TD>
|
||||
<TD ALIGN=LEFT CLASS="content"><util:font color="content.fg" size="content">
|
||||
<B><util:xlink>
|
||||
</util:xlink></b>
|
||||
</util:font></td>
|
||||
<td align="left" class="content"><util:font color="content.fg" size="content">
|
||||
<b><util:xlink>
|
||||
<util:href type="servlet">conf/topics.js.vs?<%= base_locator %>&sort=<%= ((sort_opt==SORT_NAME) ? -SORT_NAME : SORT_NAME) %></util:href>
|
||||
<util:text>Topic Name</util:text>
|
||||
</util:xlink></B>
|
||||
</util:font></TD>
|
||||
<TD ALIGN=RIGHT CLASS="content" NOWRAP><util:font color="content.fg" size="content">
|
||||
<B><util:xlink>
|
||||
</util:xlink></b>
|
||||
</util:font></td>
|
||||
<td align="right" class="content" nowrap="nowrap"><util:font color="content.fg" size="content">
|
||||
<b><util:xlink>
|
||||
<util:href type="servlet">conf/topics.js.vs?<%= base_locator %>&sort=<%= ((sort_opt==SORT_UNREAD) ? -SORT_UNREAD : SORT_UNREAD) %></util:href>
|
||||
<util:text>New</util:text>
|
||||
</util:xlink></B>
|
||||
</util:font></TD>
|
||||
<TD ALIGN=RIGHT CLASS="content" NOWRAP><util:font color="content.fg" size="content">
|
||||
<B><util:xlink>
|
||||
</util:xlink></b>
|
||||
</util:font></td>
|
||||
<td align="right" class="content" nowrap="nowrap"><util:font color="content.fg" size="content">
|
||||
<b><util:xlink>
|
||||
<util:href type="servlet">conf/topics.js.vs?<%= base_locator %>&sort=<%= ((sort_opt==SORT_TOTAL) ? -SORT_TOTAL : SORT_TOTAL) %></util:href>
|
||||
<util:text>Total</util:text>
|
||||
</util:xlink></B>
|
||||
</util:font></TD>
|
||||
<TD ALIGN=LEFT CLASS="content" NOWRAP><util:font color="content.fg" size="content">
|
||||
<B><util:xlink>
|
||||
</util:xlink></b>
|
||||
</util:font></td>
|
||||
<td align="left" class="content" nowrap="nowrap"><util:font color="content.fg" size="content">
|
||||
<b><util:xlink>
|
||||
<util:href type="servlet">conf/topics.js.vs?<%= base_locator %>&sort=<%= ((sort_opt==SORT_DATE) ? -SORT_DATE : SORT_DATE) %></util:href>
|
||||
<util:text>Last Response</util:text>
|
||||
</util:xlink></B>
|
||||
</util:font></TD>
|
||||
</TR>
|
||||
</util:xlink></b>
|
||||
</util:font></td>
|
||||
</tr>
|
||||
<tr valign="top"><td align="left" colspan="5"> </td></tr>
|
||||
<% out.flush(); response.flushBuffer(); %>
|
||||
|
||||
<TR VALIGN=TOP><TD ALIGN=LEFT COLSPAN=5> </TD></TR>
|
||||
<%
|
||||
Iterator it = topics.iterator();
|
||||
while (it.hasNext()) {
|
||||
for (Iterator it=topics.iterator(); it.hasNext(); ) {
|
||||
TopicContext topic = (TopicContext)(it.next());
|
||||
short num = topic.getTopicNumber();
|
||||
String my_locator = base_locator + "&top=" + num;
|
||||
%>
|
||||
<TR VALIGN=TOP>
|
||||
<TD ALIGN=LEFT WIDTH="1%" CLASS="content" NOWRAP><util:font color="content.fg" size="content">
|
||||
<tr valign="top">
|
||||
<td align="left" width="1%" class="content" nowrap="nowrap"><util:font color="content.fg" size="content">
|
||||
<util:xlink>
|
||||
<util:href type="servlet">conf/posts.js.vs?<%= my_locator %>&rnm=1</util:href>
|
||||
<util:text><%= num %></util:text>
|
||||
</util:xlink>
|
||||
</util:font></TD>
|
||||
<TD ALIGN=LEFT CLASS="content"><util:font color="content.fg" size="content">
|
||||
</util:font></td>
|
||||
<td align="left" class="content"><util:font color="content.fg" size="content">
|
||||
<util:xlink>
|
||||
<util:href type="servlet">conf/posts.js.vs?<%= my_locator %>&rnm=1</util:href>
|
||||
<util:text><%= topic.getName() %></util:text>
|
||||
</util:xlink>
|
||||
<% if (topic.isArchived() && (view_opt!=DISPLAY_ARCHIVED)) { %>
|
||||
<EM>(archived)</EM>
|
||||
<% } else if (topic.isFrozen()) { %>
|
||||
<EM>(frozen)</EM>
|
||||
<% if (topic.isSticky()) { %>
|
||||
<i>(sticky)</i>
|
||||
<% } // end if %>
|
||||
</util:font></TD>
|
||||
<TD ALIGN=RIGHT CLASS="content" NOWRAP><util:font color="content.fg" size="content">
|
||||
<% if (topic.isArchived() && (view_opt!=DISPLAY_ARCHIVED)) { %>
|
||||
<i>(archived)</i>
|
||||
<% } else if (topic.isFrozen()) { %>
|
||||
<i>(frozen)</i>
|
||||
<% } // end if %>
|
||||
</util:font></td>
|
||||
<td align="right" class="content" nowrap="nowrap"><util:font color="content.fg" size="content">
|
||||
<util:xlink>
|
||||
<util:href type="servlet">conf/posts.js.vs?<%= my_locator %>&rnm=1</util:href>
|
||||
<util:text><%= topic.getUnreadMessages() %></util:text>
|
||||
</util:xlink>
|
||||
</util:font></TD>
|
||||
<TD ALIGN=RIGHT CLASS="content" NOWRAP><util:font color="content.fg" size="content">
|
||||
</util:font></td>
|
||||
<td align="right" class="content" nowrap="nowrap"><util:font color="content.fg" size="content">
|
||||
<util:xlink>
|
||||
<util:href type="servlet">conf/posts.js.vs?<%= my_locator %>&p1=0&p2=-1</util:href>
|
||||
<util:text><%= topic.getTotalMessages() %></util:text>
|
||||
</util:xlink>
|
||||
</util:font></TD>
|
||||
<TD ALIGN=LEFT CLASS="content" NOWRAP><util:font color="content.fg" size="content">
|
||||
</util:font></td>
|
||||
<td align="left" class="content" nowrap="nowrap"><util:font color="content.fg" size="content">
|
||||
<util:xlink>
|
||||
<util:href type="servlet">conf/posts.js.vs?<%= my_locator %>&rnm=1</util:href>
|
||||
<util:text><%= view.formatDate(topic.getLastUpdateDate()) %></util:text>
|
||||
</util:xlink>
|
||||
</util:font></TD>
|
||||
</TR>
|
||||
</util:font></td>
|
||||
</tr>
|
||||
<%
|
||||
out.flush();
|
||||
response.flushBuffer();
|
||||
} // end while (more topics in enumeration)
|
||||
} // end for (all topics in enumeration)
|
||||
%>
|
||||
</TABLE><P>
|
||||
</table><p />
|
||||
<% } else { %>
|
||||
<EM><%
|
||||
<i><%
|
||||
switch (view_opt)
|
||||
{
|
||||
case DISPLAY_NEW:
|
||||
@@ -200,58 +202,59 @@
|
||||
out.write("Invalid display option selected.");
|
||||
break;
|
||||
} // end switch
|
||||
%></EM>
|
||||
<P>
|
||||
%></i>
|
||||
<p />
|
||||
<% } // end if %>
|
||||
<% out.flush(); response.flushBuffer(); %>
|
||||
|
||||
<DIV ALIGN="CENTER" CLASS="content">
|
||||
<B>[</B>
|
||||
<div align="center" class="content">
|
||||
<b>[</b>
|
||||
<% if (view_opt==DISPLAY_NEW) { %>
|
||||
<B>New</B>
|
||||
<b>New</b>
|
||||
<% } else { %>
|
||||
<util:xlink>
|
||||
<util:href type="servlet">conf/topics.js.vs?<%= base_locator %>&view=<%= DISPLAY_NEW %></util:href>
|
||||
<util:text>New</util:text>
|
||||
</util:xlink>
|
||||
<% } // end if %>
|
||||
<B>|</B>
|
||||
<b>|</b>
|
||||
<% if (view_opt==DISPLAY_ACTIVE) { %>
|
||||
<B>Active</B>
|
||||
<b>Active</b>
|
||||
<% } else { %>
|
||||
<util:xlink>
|
||||
<util:href type="servlet">conf/topics.js.vs?<%= base_locator %>&view=<%= DISPLAY_ACTIVE %></util:href>
|
||||
<util:text>Active</util:text>
|
||||
</util:xlink>
|
||||
<% } // end if %>
|
||||
<B>|</B>
|
||||
<b>|</b>
|
||||
<% if (view_opt==DISPLAY_ALL) { %>
|
||||
<B>All</B>
|
||||
<b>All</b>
|
||||
<% } else { %>
|
||||
<util:xlink>
|
||||
<util:href type="servlet">conf/topics.js.vs?<%= base_locator %>&view=<%= DISPLAY_ALL %></util:href>
|
||||
<util:text>All</util:text>
|
||||
</util:xlink>
|
||||
<% } // end if %>
|
||||
<B>|</B>
|
||||
<b>|</b>
|
||||
<% if (view_opt==DISPLAY_HIDDEN) { %>
|
||||
<B>Hidden</B>
|
||||
<b>Hidden</b>
|
||||
<% } else { %>
|
||||
<util:xlink>
|
||||
<util:href type="servlet">conf/topics.js.vs?<%= base_locator %>&view=<%= DISPLAY_HIDDEN %></util:href>
|
||||
<util:text>Hidden</util:text>
|
||||
</util:xlink>
|
||||
<% } // end if %>
|
||||
<B>|</B>
|
||||
<b>|</b>
|
||||
<% if (view_opt==DISPLAY_ARCHIVED) { %>
|
||||
<B>Archived</B>
|
||||
<b>Archived</b>
|
||||
<% } else { %>
|
||||
<util:xlink>
|
||||
<util:href type="servlet">conf/topics.js.vs?<%= base_locator %>&view=<%= DISPLAY_ARCHIVED %></util:href>
|
||||
<util:text>Archived</util:text>
|
||||
</util:xlink>
|
||||
<% } // end if %>
|
||||
<B>]</B>
|
||||
</DIV>
|
||||
<b>]</b>
|
||||
</div>
|
||||
</util:font>
|
||||
<%= view.getRequestAttribute("conference.custom.bottom").toString() %>
|
||||
<%-- EOF --%>
|
||||
|
||||
Reference in New Issue
Block a user