<%--
  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) 2001 Eric J. Bowersox/Silverwrist Design Studios.  All Rights Reserved.

  Contributor(s): 
--%>
<%@ page import = "java.util.*" %>
<%@ page import = "com.silverwrist.util.StringUtil" %>
<%@ page import = "com.silverwrist.venice.core.*" %>
<%@ page import = "com.silverwrist.venice.servlets.Variables" %>
<%@ page import = "com.silverwrist.venice.servlets.format.*" %>
<%
  ConferenceSequence data = ConferenceSequence.retrieve(request);
  Variables.failIfNull(data);
  RenderData rdat = RenderConfig.createRenderData(application,request,response);
%>
<% if (rdat.useHTMLComments()) { %><!-- Manage conference list for community #<%= data.getCommunityID() %> --><% } %>
<% rdat.writeContentHeader(out,"Manage Conference List",null); %>
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>
  <A HREF="<%= rdat.getEncodedServletPath("confops?sig=" + data.getCommunityID()) %>">Return to Conference List</A>
</FONT><P>
<% if (data.getNumConferences()>0) { %>
  <TABLE BORDER=0 ALIGN=CENTER CELLPADDING=0 CELLSPACING=2>
    <% for (int i=0; i<data.getNumConferences(); i++) { %>
      <%
        ConferenceContext conf = data.getConference(i);
        String partial = "confops?sig=" + data.getCommunityID() + "&conf=" + conf.getConfID();
        String tail, image, alt;
      %>
      <TR VALIGN=TOP>
        <TD ALIGN=CENTER WIDTH=16>
          <%
            if (data.isConferenceHidden(conf))
            { // conference is hidden - this command will show it
              tail = "&cmd=SH&flag=0";
              image = "icn_off.gif";
              alt = "Hidden (toggle)";

            } // end if
            else
            { // conference is non-hidden - this command will hide it
              tail = "&cmd=SH&flag=1";
              image = "icn_on.gif";
              alt = "Displayed (toggle)";

            } // end else
          %>
          <A HREF="<%= rdat.getEncodedServletPath(partial + tail) %>"><IMG
             SRC="<%= rdat.getFullImagePath(image) %>" ALT="<%= alt %>" WIDTH=16 HEIGHT=16 BORDER=0></A>
        </TD>
        <TD ALIGN=CENTER WIDTH=16>
          <% if (i==(data.getNumConferences()-1)) { %>&nbsp;<% } else { %>
            <% tail = "&cmd=SS&oc=" + data.getNextConfID(conf); %>
            <A HREF="<%= rdat.getEncodedServletPath(partial + tail) %>"><IMG
             SRC="<%= rdat.getFullImagePath("icn_down.gif") %>" ALT="Move Down" BORDER=0 WIDTH=16
             HEIGHT=16></A>
          <% } // end if %>
        </TD>
        <TD ALIGN=CENTER WIDTH=16>
          <% if (i==0) { %>&nbsp;<% } else { %>
            <% tail = "&cmd=SS&oc=" + data.getPrevConfID(conf); %>
            <A HREF="<%= rdat.getEncodedServletPath(partial + tail) %>"><IMG
             SRC="<%= rdat.getFullImagePath("icn_up.gif") %>" ALT="Move Up" BORDER=0 WIDTH=16
             HEIGHT=16></A>
          <% } // end if %>
        </TD>
        <TD ALIGN=CENTER WIDTH=16>
          <A HREF="<%= rdat.getEncodedServletPath(partial + "&cmd=SDEL") %>"><IMG
           SRC="<%= rdat.getFullImagePath("icn_x.gif") %>" ALT="Remove" BORDER=0 WIDTH=16
           HEIGHT=16></A>
        </TD>
        <TD ALIGN=LEFT CLASS="content"><%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>
          <%= StringUtil.encodeHTML(conf.getName()) %>
	</FONT></TD>
      </TR>
    <% } // end for %>
  </TABLE><P>

  <TABLE BORDER=0 CELLPADDING=2 CELLSPACING=0>
    <TR VALIGN=TOP>
      <TD ALIGN=CENTER WIDTH=16>
        <IMG SRC="<%= rdat.getFullImagePath("icn_on.gif") %>" ALT="Displayed (toggle)" BORDER=0 WIDTH=16
	     HEIGHT=16>
      </TD>
      <TD ALIGN=LEFT CLASS="content"><%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>
        This indicates that the conference is displayed in the community's conference list.  Click the symbol
	to hide it.
      </FONT></TD>
    </TR>
    <TR VALIGN=TOP>
      <TD ALIGN=CENTER WIDTH=16>
        <IMG SRC="<%= rdat.getFullImagePath("icn_off.gif") %>" ALT="Hidden (toggle)" BORDER=0 WIDTH=16
	     HEIGHT=16>
      </TD>
      <TD ALIGN=LEFT CLASS="content"><%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>
        This indicates that the conference is hidden in the community's conference list.  Click the symbol
	to display it.
      </FONT></TD>
    </TR>
    <TR VALIGN=TOP>
      <TD ALIGN=CENTER WIDTH=16>
        <IMG SRC="<%= rdat.getFullImagePath("icn_down.gif") %>" ALT="Move Down" BORDER=0 WIDTH=16 HEIGHT=16>
      </TD>
      <TD ALIGN=LEFT CLASS="content"><%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>
        Click this symbol to move the specified conference down in the community's conference list.
      </FONT></TD>
    </TR>
    <TR VALIGN=TOP>
      <TD ALIGN=CENTER WIDTH=16>
        <IMG SRC="<%= rdat.getFullImagePath("icn_up.gif") %>" ALT="Move Up" BORDER=0 WIDTH=16 HEIGHT=16>
      </TD>
      <TD ALIGN=LEFT CLASS="content"><%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>
        Click this symbol to move the specified conference up in the community's conference list.
      </FONT></TD>
    </TR>
    <TR VALIGN=TOP>
      <TD ALIGN=CENTER WIDTH=16>
        <IMG SRC="<%= rdat.getFullImagePath("icn_x.gif") %>" ALT="Remove" BORDER=0 WIDTH=16 HEIGHT=16>
      </TD>
      <TD ALIGN=LEFT CLASS="content"><%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>
        Click this symbol to delete the specified conference.  You will be prompted to confirm this
	action.
      </FONT></TD>
    </TR>
  </TABLE>
<% } else { %>
  <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %><EM>There are no conferences in
  this community.</EM></FONT>
<% } // end if %>
