<%--
  Copyright 2003 Sun Microsystems, Inc. All rights reserved 
  Use is subject to license terms.
 --%>
<%-- @(#)discussionEdit.jsp --%>

<%@page language= "java" import="com.sun.portal.providers.jsp.JSPProvider, java.lang.*" %>
<%@page errorPage="error.jsp" %>

<%@ taglib uri="/tld/jx.tld" prefix="jx" %>

<%@ include file="portal.jsp" %>
<%@ include file="declare.jsp" %>

<%
// Set the form values with the current display profile settings
String five="", eight="", ten="", sixteen="";
String ea="", r="", intg="", imp="",mr="", ca= "", ir="";
String exp="", col="";
String vdwSelection= "", showDescSelection= "";
String flat = "", threaded= "";

if (hitNumber.toString().equals("5")) {
    five= "SELECTED";
} else if (hitNumber.toString().equals("8")) {
    eight= "SELECTED";
} else if (hitNumber.toString().equals("10")) {
    ten= "SELECTED";
} else if (hitNumber.toString().equals("16")) {
    sixteen= "SELECTED";
} else {
    five= "SELECTED";
}

if (vdw.booleanValue()) {
  vdwSelection = "CHECKED";
} 

if (ddd.equalsIgnoreCase("flat")) {
  flat = "SELECTED";
} else {
  threaded = "SELECTED";
}

if (df.equalsIgnoreCase("Irrelevant")) {
   ir = "SELECTED";
} else if (df.equalsIgnoreCase("Interesting")) {
   intg = "SELECTED";
} else if (df.equalsIgnoreCase("Important")) {
   imp = "SELECTED";
} else if (df.equalsIgnoreCase("Must Read")) {
   mr = "SELECTED";
} else {
   r = "SELECTED";
}

if (det.equalsIgnoreCase("Expand All")) {
   exp= "SELECTED";
} else {
   col= "SELECTED";
}

if (showDesc != null && showDesc.booleanValue()) {
  showDescSelection = "CHECKED";
}
%>


<table border=0 cellspacing=1 cellpadding=2 width="75%">
    <TR><TD colspan=2 align="center" bgcolor="<%=tTitleBarColor%>"><font color="#FFFFFF" face=<%=tFontFace%> size="+1"><B>All Discussions page</B></font></TD>
    </TR>

    <tr>
    <td colspan=2>&nbsp;</td>
    </tr>

    <TR>
    <td><font color="<%=tFontColor%>" face="<%=tFontFace%>" size="+0"><b><LABEL FOR="viewHits">Discussions per page: </LABEL></b></font></td>
    <td align="left"><font color="<%=tFontColor%>" face="<%=tFontFace%>" size="+0">
    <SELECT NAME ="viewHits" id="viewHits"> 
    <OPTION VALUE=5 <%=five%>>5</OPTION>
    <OPTION VALUE=8 <%=eight%>>8</OPTION>
    <OPTION VALUE=10 <%=ten%>>10</OPTION>
    <OPTION VALUE=16 <%=sixteen%>>16</OPTION>
    </SELECT></font></TD>
    </TR>

    <TR>
    <TD><font color="<%=tFontColor%>" face="<%=tFontFace%>" size="+0"><b><LABEL FOR="showDesc">Show Description ? </LABEL></b></font></td>
    <td align="left"><font color="<%=tFontColor%>" face="<%=tFontFace%>" size="+0"><input type=checkbox name="showDesc" <%=showDescSelection%> ID="showDesc"></font></td>
    </TR>

    <TR>
    <TD><font color="<%=tFontColor%>" face="<%=tFontFace%>" size="+0"><b><LABEL FOR="vdw">View discussion in new window ? </LABEL></b></font></td>
    <td><font color="<%=tFontColor%>" face="<%=tFontFace%>" size="+0"><input type=checkbox name="vdw" <%=vdwSelection%> ID="vdw"></font></td>
    </TR>


    <tr>
    <td colspan=2>&nbsp;</td>
    </tr>

    <tr>
    <td colspan=2>&nbsp;</td>
    </tr>

    <TR><TD colspan=2 align="center" bgcolor="<%=tTitleBarColor%>"><font color="#FFFFFF" face=<%=tFontFace%> size="+1"><B>View Discussion page</B></font></TD>
    </TR>

    <tr>
    <td colspan=2></td>
    </tr>


    <TR>
    <td><font color="<%=tFontColor%>" face="<%=tFontFace%>" size="+0"><b><LABEL FOR="filter">Default Filter: </LABEL></b></font></td> 
    <td><font color="<%=tFontColor%>" face="<%=tFontFace%>" size="+0"><SELECT NAME ="filter" id="filter"> 
    <OPTION VALUE="Irrelevant" <%=ir%>>Irrelevant</OPTION>
    <OPTION VALUE="Routine" <%=r%>>Routine</OPTION>
    <OPTION VALUE="Interesting" <%=intg%>>Interesting</OPTION>
    <OPTION VALUE="Important" <%=imp%>>Important</OPTION>
    <OPTION VALUE="Must Read" <%=mr%>>Must Read</OPTION>
    </SELECT></font>
    </td>
    </TR>

    <TR>
    <td><font color="<%=tFontColor%>" face="<%=tFontFace%>" size="+0"><b><LABEL FOR="threshold">Default Threshold: </LABEL></b></font></td> 
    <td><font color="<%=tFontColor%>" face="<%=tFontFace%>" size="+0"><SELECT NAME ="threshold" id="threshold"> 
    <OPTION VALUE="Expand All" <%=exp%>>Expand All</OPTION>
    <OPTION VALUE="Collapse All" <%=col%>>Collapse All</OPTION>
    </SELECT></font>
    </td>
    </TR>

    <TR>
    <td><font color="<%=tFontColor%>" face="<%=tFontFace%>" size="+0"><b><LABEL FOR="view">Default View: </LABEL></b></font></td> 
    <td><font color="<%=tFontColor%>" face="<%=tFontFace%>" size="+0"><SELECT NAME ="dd" id="view"> 
    <OPTION VALUE="Flat" <%=flat%>>Flat</OPTION>
    <OPTION VALUE="Threaded" <%=threaded%>>Threaded</OPTION>
    </SELECT></font>
    </td>
    </TR>

</table>
<br>
