<%--
  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>
