implement move message between topics in a conference

This commit is contained in:
Eric J. Bowersox
2002-02-02 07:16:28 +00:00
parent 25c5817a67
commit a404987a42
18 changed files with 770 additions and 90 deletions

View File

@@ -0,0 +1,65 @@
<%--
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.
The Original Code is the Venice Web Communities System.
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) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
Contributor(s):
--%>
<%@ page import = "java.util.*" %>
<%@ page import = "com.silverwrist.venice.core.*" %>
<%@ page import = "com.silverwrist.venice.ui.conf.CurrentConference" %>
<%@ page import = "com.silverwrist.venice.ui.view.JSPView" %>
<%@ taglib uri="/tlds/util" prefix="util" %>
<%@ taglib uri="/tlds/community" prefix="comm" %>
<%@ taglib uri="/tlds/conference" prefix="conf" %>
<%@ taglib uri="/tlds/topic" prefix="topic" %>
<%
JSPView view = JSPView.get(request);
CurrentConference currc = CurrentConference.get(request);
TopicMessageContext msg = (TopicMessageContext)(view.getRequestAttribute("message.move.message"));
final String poster = view.getRequestAttribute("message.move.postername").toString();
final List targets = (List)(view.getRequestAttribute("message.move.topics"));
%>
<util:comment>Moving message #<%= msg.getPostID() %> to another topic</util:comment>
<util:header title="Move Message"/>
<util:font color="content.fg" size="content">
Message <%= msg.getPostNumber() %> of <topic:last_message/>:
<% if (msg.isHidden()) { %>
<B><EM>(Hidden)</EM></B>
<% } // end if %>
<BR>
<B><%= msg.getPseud() %></B>
(<EM>
<util:xlink target="_blank">
<util:href type="servlet">user/<%= poster %></util:href>
<util:text><%= poster %></util:text>
</util:xlink>,
<%= view.formatDate(msg.getPostDate()) %>
</EM>)
<P>
<util:form action="conf/move_message.js.vs" type="servlet">
<INPUT TYPE="HIDDEN" NAME="cc" VALUE="<comm:ID/>">
<INPUT TYPE="HIDDEN" NAME="conf" VALUE="<conf:ID/>">
<INPUT TYPE="HIDDEN" NAME="top" VALUE="<topic:number/>">
<INPUT TYPE="HIDDEN" NAME="msg" VALUE="<%= msg.getPostNumber() %>">
<B>Move to topic:</B>&nbsp;
<SELECT NAME="target" SIZE="1">
<% Iterator it = targets.iterator(); %>
<% while (it.hasNext()) { %>
<% TopicContext xtopic = (TopicContext)(it.next()); %>
<OPTION VALUE="<%= xtopic.getTopicID() %>"><%= xtopic.getName() %></OPTION>
<% } // end while %>
</SELECT><P>
<util:button id="move" type="input"/>&nbsp;<util:button id="cancel" type="input"/>
</util:form><P>
</util:font>

View File

@@ -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):
--%>
@@ -58,49 +58,7 @@
<TABLE BORDER=0 WIDTH="100%" CELLPADDING=0 CELLSPACING=0>
<TR VALIGN=BOTTOM>
<TD NOWRAP ALIGN=LEFT COLSPAN=2 CLASS="content">
<util:comment>Topic user controls section</util:comment>
<util:xlink>
<util:href type="servlet">conf/topics.js.vs?<%= base_locator %></util:href>
<util:text><util:button id="topic_list"/></util:text>
</util:xlink>
&nbsp;
<% if (my_topic.isHidden()) { %>
<util:xlink>
<util:href type="servlet">conf/hide_topic.js.vs?<%= topic_locator %>&flag=0</util:href>
<util:text><util:button id="show_topic"/></util:text>
</util:xlink>
<% } else { %>
<util:xlink>
<util:href type="servlet">conf/hide_topic.js.vs?<%= topic_locator %>&flag=1</util:href>
<util:text><util:button id="hide_topic"/></util:text>
</util:xlink>
<% } // end if %>
&nbsp;
<% if (view.canDoNextTopic()) { %>
<util:xlink>
<util:href type="servlet">conf/posts.js.vs?<%= next_locator %>&rnm=1</util:href>
<util:text><util:button id="next_topic"/></util:text>
</util:xlink>
&nbsp;
<% if (my_unread>0) { %>
<util:xlink>
<util:href type="servlet">conf/posts.js.vs?<%= next_locator %>&rnm=1&<%= restorer %></util:href>
<util:text><util:button id="next_topic_keep"/></util:text>
</util:xlink>
&nbsp;
<%
} // end if
} // end if
%>
<util:xlink>
<util:href type="servlet">conf/find.js.vs?<%= topic_locator %></util:href>
<util:text><util:button id="find"/></util:text>
</util:xlink>
&nbsp;
<util:xlink>
<util:href type="servlet">conf/manage_topic.js.vs?<%= topic_locator %></util:href>
<util:text><util:button id="manage"/></util:text>
</util:xlink>
<util:call_jsp name="conf/posts_usercontrols.jsp"/>
</TD>
</TR>
<% out.flush(); response.flushBuffer(); %>
@@ -388,6 +346,16 @@ conf/posts.js.vs?<%= topic_locator %>&p1=<%= my_last + 1 %>&p2=<%= Math.min(my_l
</util:xlink><P>
<%
} // end if (can nuke)
if (msg.canMove() && (my_topic.getTotalMessages()>1)) {
%>
<util:xlink>
<util:href type="servlet">
conf/move_message.js.vs?<%= topic_locator %>&msg=<%= msg.getPostNumber() %>
</util:href>
<util:text><util:button id="move"/></util:text>
</util:xlink><P>
<%
} // end if (can move)
if (msg.canPublish()) {
%>
<util:xlink>
@@ -451,49 +419,7 @@ conf/posts.js.vs?<%= topic_locator %>&p1=<%= my_last + 1 %>&p2=<%= Math.min(my_l
<TR VALIGN=BOTTOM>
<TD NOWRAP ALIGN=LEFT COLSPAN=2 CLASS="content">
<util:comment>Topic user controls section</util:comment>
<util:xlink>
<util:href type="servlet">conf/topics.js.vs?<%= base_locator %></util:href>
<util:text><util:button id="topic_list"/></util:text>
</util:xlink>
&nbsp;
<% if (my_topic.isHidden()) { %>
<util:xlink>
<util:href type="servlet">conf/hide_topic.js.vs?<%= topic_locator %>&flag=0</util:href>
<util:text><util:button id="show_topic"/></util:text>
</util:xlink>
<% } else { %>
<util:xlink>
<util:href type="servlet">conf/hide_topic.js.vs?<%= topic_locator %>&flag=1</util:href>
<util:text><util:button id="hide_topic"/></util:text>
</util:xlink>
<% } // end if %>
&nbsp;
<% if (view.canDoNextTopic()) { %>
<util:xlink>
<util:href type="servlet">conf/posts.js.vs?<%= next_locator %>&rnm=1</util:href>
<util:text><util:button id="next_topic"/></util:text>
</util:xlink>
&nbsp;
<% if (my_unread>0) { %>
<util:xlink>
<util:href type="servlet">conf/posts.js.vs?<%= next_locator %>&rnm=1&<%= restorer %></util:href>
<util:text><util:button id="next_topic_keep"/></util:text>
</util:xlink>
&nbsp;
<%
} // end if
} // end if
%>
<util:xlink>
<util:href type="servlet">conf/find.js.vs?<%= topic_locator %></util:href>
<util:text><util:button id="find"/></util:text>
</util:xlink>
&nbsp;
<util:xlink>
<util:href type="servlet">conf/manage_topic.js.vs?<%= topic_locator %></util:href>
<util:text><util:button id="manage"/></util:text>
</util:xlink>
<util:call_jsp name="conf/posts_usercontrols.jsp"/>
</TD>
</TR>
</TABLE>

View File

@@ -0,0 +1,88 @@
<%--
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.
The Original Code is the Venice Web Communities System.
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) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
Contributor(s):
--%>
<%@ page import = "java.util.*" %>
<%@ page import = "com.silverwrist.venice.core.*" %>
<%@ page import = "com.silverwrist.venice.ui.conf.CurrentConference" %>
<%@ page import = "com.silverwrist.venice.ui.conf.view.PostsView" %>
<%@ page import = "com.silverwrist.venice.ui.view.NestedJSPView" %>
<%@ taglib uri="/tlds/util" prefix="util" %>
<%@ taglib uri="/tlds/community" prefix="comm" %>
<%@ taglib uri="/tlds/conference" prefix="conf" %>
<%@ taglib uri="/tlds/topic" prefix="topic" %>
<%
NestedJSPView view = NestedJSPView.get(request);
PostsView outer_view = (PostsView)(view.getOuterView());
final int my_unread = outer_view.getUnread();
final short my_next = outer_view.getNextTopic();
final String restorer = "rtop=" + outer_view.getTopic().getTopicNumber() + "&rct=" + my_unread;
%>
<%-- Broken out from posts.jsp, which was getting too large and complex --%>
<util:comment>Topic user controls section</util:comment>
<util:xlink>
<util:href type="servlet">conf/topics.js.vs?cc=<comm:ID/>&conf=<conf:ID/></util:href>
<util:text><util:button id="topic_list"/></util:text>
</util:xlink>
&nbsp;
<topic:is_hidden>
<util:xlink>
<util:href type="servlet">
conf/hide_topic.js.vs?cc=<comm:ID/>&conf=<conf:ID/>&top=<topic:number/>&flag=0
</util:href>
<util:text><util:button id="show_topic"/></util:text>
</util:xlink>
</topic:is_hidden>
<topic:is_not_hidden>
<util:xlink>
<util:href type="servlet">
conf/hide_topic.js.vs?cc=<comm:ID/>&conf=<conf:ID/>&top=<topic:number/>&flag=1
</util:href>
<util:text><util:button id="hide_topic"/></util:text>
</util:xlink>
</topic:is_not_hidden>
&nbsp;
<% if (outer_view.canDoNextTopic()) { %>
<util:xlink>
<util:href type="servlet">
conf/posts.js.vs?cc=<comm:ID/>&conf=<conf:ID/>&top=<%= my_next %>&rnm=1
</util:href>
<util:text><util:button id="next_topic"/></util:text>
</util:xlink>
&nbsp;
<% if (my_unread>0) { %>
<util:xlink>
<util:href type="servlet">
conf/posts.js.vs?cc=<comm:ID/>&conf=<conf:ID/>&top=<%= my_next %>&rnm=1&<%= restorer %>
</util:href>
<util:text><util:button id="next_topic_keep"/></util:text>
</util:xlink>
&nbsp;
<%
} // end if
} // end if
%>
<util:xlink>
<util:href type="servlet">conf/find.js.vs?cc=<comm:ID/>&conf=<conf:ID/>&top=<topic:number/></util:href>
<util:text><util:button id="find"/></util:text>
</util:xlink>
&nbsp;
<util:xlink>
<util:href type="servlet">
conf/manage_topic.js.vs?cc=<comm:ID/>&conf=<conf:ID/>&top=<topic:number/>
</util:href>
<util:text><util:button id="manage"/></util:text>
</util:xlink>

1
web/images/classic/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.xvpics

BIN
web/images/classic/move.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

1
web/images/gelcap/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.xvpics

BIN
web/images/gelcap/move.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB