<%--
  Copyright 2003 Sun Microsystems, Inc. All rights reserved 
  Use is subject to license terms.
 --%>
<%-- NTE.jsp --%>

<%@page info="NTE" language="java"%>
<%@taglib uri="/WEB-INF/jato.tld" prefix="jato"%>
<%@taglib uri="/WEB-INF/console.tld" prefix="console"%>
<%@taglib uri="/WEB-INF/searchadmin.tld" prefix="searchadmin"%>

<jato:useViewBean className="com.sun.portal.search.admin.NTEViewBean">
<%-- Because of a bug in iAS, this directive is currently necessary --%>
<jsp:useBean id="viewBean" type="com.sun.portal.search.admin.NTEViewBean"/>
<HTML>
<HEAD>
<TITLE><searchadmin:text key="category.edit"/></TITLE>
<script language="JavaScript">
function runAction() {
    window.open('RunTaxonomyReindex','_blank', 'width=800,height=300,toolbar=no,scrollbars=yes,resizable=yes');
}
</script>


<%@include file="/ps/searchadmin/CSHeader.jsp"%>
<script language="javascript">
if (parent.headerFrame) {
    parent.headerFrame.helpDocURL = "<jato:text name="helpDocURL"/>";
    parent.headerFrame.helpPage = "<searchadmin:text key="help.category.editor"/>";
}
</script>

<searchadmin:AdminMenu selected="NTE" images="../ps/searchadmin/images"/>
<head>
  <style type="text/css">
  <!--
    .blueBG { background: #ccccff; }
  //-->
  </style>
  <script language="JavaScript">
    function checkSave() {
      alert("really wanna save !!");
    }
    function check() {
      alert("really wanna reload the taxonomy on file!!");
    }
    function checkDelete(action) {
      if (action == "delete") {
        alert("really wanna delete");
      }
    }
    function changeNbDisplayedNodes(nbNodes) {
      document.location='<jato:text name="changeNbNodesUrl" />'+nbNodes+'&page='+<jato:text name="targetPageNbNodesUrl" />;
      return;
    }
    function jumpToPage(targetPage) {
      document.location='<jato:text name="jumpPageUrl" />'+targetPage;
      return;
    }
  </script>

</head>
<table border="0" align="center">
    <tr>
      <td align="center" valign="top">
	<console:messagebox name="MessageBox" fireDisplayEvents="true" imageURI="../console/images"/>
      </td>
    </tr>
</table>

<console:form name="NTE" method="post">

  <jato:content name="browseMode">
  <table cellpadding="0" cellspacing="0" width="100%" align="center" border="0">
    <tr>
      <td width="50%" align="left"><br></td>
      <td align="right" width="50%" height="2"> 
        <table border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td align="right">
              <console:button name="TaxSave" />
            </td>
            <td align="right">
              <console:button name="TaxReset" />
            </td>
            <td align="right">
              <console:button name="TaxReindex" onClick="javascript:runAction(); return false;"/>
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  <div align=center>
  <table border="0" width="100%">
    <tr>
      <td>
        <div class="help-text">
          <searchadmin:text key="category.edit.desc"/>
        </div>
      </td>
    </tr>
  </table>
  </div>
  <br>
  <jato:content name="persistanceMsg">
  <table border="0" align="center">
    <tr>
      <td align="center" valign="top">
        <console:messagebox name="errorMsgBox" imageURI="../console/images"/>
      </td>
      <td align="center" valign="top">
        <console:messagebox name="warningMsgBox" imageURI="../console/images"/>
      </td>
    </tr>
  </table>
  </jato:content>
  </jato:content>
  <jato:content name="browseMode">
  <table cellpadding="2" cellspacing="0" width="100%" align="center" border="0" class="blueBG">
    <tr  align="left" valign="middle">
<td nowrap valign="middle" width="1%" align="center"><jato:content name="PreviousLink"><jato:href name="PreviousLink" trim="true"><img src="../ps/searchadmin/images/up.gif" width="19" height="19" alt="<searchadmin:text key="category.edit.previous"/>" border="0"></jato:href></jato:content><jato:content name="NotPreviousLink"><img src="../ps/searchadmin/images/blank.gif" width="19" height="19" alt=""></jato:content></td>
<td nowrap valign="middle" width="1%" align="left"><label for="category.edit.nbNodes">&nbsp;<searchadmin:text key="category.edit.nbNodes"/></label></td>
<td nowrap valign="middle" width="1%" align="right"><jato:combobox name="NodesPerPage" elementId="category.edit.nbNodes" onChange="changeNbDisplayedNodes(this[this.selectedIndex].value);return true;" /></td>
<td nowrap valign="middle" width="100%" align="center">&nbsp;</td>
<td nowrap valign="middle" width="1%" align="center"><console:button name="ExpandAll" /></td>
<td nowrap valign="middle" width="1%" align="center"><console:button name="CollapseAll" /></td>
</tr>
</table>
<jato:content name="PageSelect">
  <table cellpadding="2" cellspacing="0" width="100%" align="center" border="0" class="blueBG">
<tr  align="left" valign="middle">
<td nowrap valign="middle" width="1%" align="center"><jato:content name="NextLink"><jato:href name="NextLink" trim="true"><img src="../ps/searchadmin/images/down.gif" alt="<searchadmin:text key="category.edit.next"/>" border="0"></jato:href></jato:content><jato:content name="NotNextLink"><img src="../ps/searchadmin/images/blank.gif" width="19" height="19" alt=""></jato:content></td>
<td nowrap valign="middle" width="1%" align="right"><label for="category.edit.pageIndex">&nbsp;<searchadmin:text key="category.edit.pageIndex"/>&nbsp;:&nbsp;</label></td>
<td colspan="3" nowrap valign="middle" width="1%" align="left" nowrap><jato:combobox name="PageSelect" onChange="jumpToPage(this[this.selectedIndex].value);return true;"/></td>
<td nowrap valign="middle" width="100%" align="center">&nbsp;</td>
</tr>
  </table>
    </jato:content>
  </jato:content>
  <table>
    <tr>
      <td align="left" valign="middle">
        <jato:tiledView name="catPath">
          <jato:content name="browseMode"><jato:href name="catPathElemHref" trim="true"><jato:text name="catPathElemName" /></jato:href></jato:content><jato:content name="editMode"><jato:text name="catPathElemName" /></jato:content>
          <jato:content name="catPathElemSeparator">&nbsp;<jato:text name="catPathElemSeparator" />&nbsp;</jato:content>
        </jato:tiledView>
      </td>
    </tr>
  </table>
  <table align="center" width="100%" border="0" cellspacing="0" cellpadding="0">
    <TR> 
      <TD valign="top" width="100%"> 
        <TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
	  <TR> 
	    <TD valign="top" class="properties-separator"><IMG src="../ps/searchadmin/images/blank.gif" width="1" height="2" alt=""></TD>
          </TR>
        </TABLE>
      </TD>
    </TR>
  </TABLE>
<jato:treeView name="NTTView" id="NTTView" type="com.sun.portal.search.admin.NTTView" fireChildDisplayEvents="true">
 <jato:content name="displayedNode">
  <jato:content name="browseMode">
  <jato:treeNodeLevel offset="0">&nbsp;&nbsp;&nbsp;</jato:treeNodeLevel>
  <jato:treeNode nodeType="Parent">
   <jato:treeNode isExpanded="false">
    <jato:treeNodeHandle>
     <img src="../ps/searchadmin/images/handle-open.gif" alt="<searchadmin:text key="category.edit.action_label.collapse_branch"/>" border="0">
    </jato:treeNodeHandle>
   </jato:treeNode>
   <jato:treeNode isExpanded="true">
    <jato:treeNodeHandle>
     <img src="../ps/searchadmin/images/handle-close.gif" alt="<searchadmin:text key="category.edit.action_label.expand_branch"/>" border="0">
    </jato:treeNodeHandle>
   </jato:treeNode>
   <jato:content name="highlight"> 
      <a name="selected"></a>
   </jato:content>
   <jato:href name="Href1" trim="true">
    <jato:content name="highlight"> 
     <B>
    </jato:content>
    <jato:text name="name"/>
    <jato:content name="highlight"> 
     </B>
    </jato:content>
   </jato:href>
  </jato:treeNode>
  <jato:treeNode nodeType="Leaf">
   <img src="../ps/searchadmin/images/blank.gif" width="14" alt="">
   <jato:content name="highlight"> 
    <a name="selected"></a>
   </jato:content>
   <jato:href name="Href1" trim="true">
    <jato:content name="highlight"> 
     <B>
    </jato:content>
    <jato:text name="name"/>
    <jato:content name="highlight"> 
     </B>
    </jato:content>
   </jato:href>
  </jato:treeNode>
  </jato:content>
  <jato:content name="editMode">
      <jato:containerView name="NCE">
       <table border="0" cellpadding="4" cellspacing="0">
        <tr>
           <td valign="middle" align="center" colspan="2">
                <console:messagebox name="errorBox" imageURI="../console/images"/>
           </td>
        </tr>
        <tr valign="middle">
           <td align="right" valign="middle" width="30%">
                <DIV class="properties-level3-label-text">
                  <LABEL FOR="category.edit.CategoryNameLabel">
                    <searchadmin:text key="category.edit.CategoryNameLabel"/>&nbsp;:&nbsp;
                  </LABEL>
                </DIV>
           </td>
           <td align="left" valign="middle" width="70%">
                <jato:textField name="TaxName" size="30" elementId="category.edit.CategoryNameLabel"/>
           </td>
        </tr>
        <tr> 
           <td align="right" valign="middle" width="30%">
                <DIV class="properties-level3-label-text">
                  <LABEL FOR="category.edit.CategoryDescLabel">
                    <searchadmin:text key="category.edit.CategoryDescLabel"/>&nbsp;:&nbsp;
                  </LABEL>
                </DIV>
           </td>
           <td align="left" valign="middle" width="70%">
                <jato:textField name="TaxDesc" size="30" elementId="category.edit.CategoryDescLabel"/>
           </td>
        </tr>
         <jato:content name="IsClassification">
           <tr> 
            <td align="right" valign="middle" width="30%">
                <DIV class="properties-level3-label-text">
                  <LABEL FOR="category.edit.CategoryRule">
                    <searchadmin:text key="category.edit.CategoryRuleLabel"/>&nbsp;:&nbsp;
                  </LABEL>
                </DIV>
            </td>
            <td align="left" valign="middle" width="70%">
                <jato:textField name="TaxRule" size="30" elementId="category.edit.CategoryRule"/>
            </td>
           </tr>
         </jato:content>
        <tr>
            <td colspan="2" align="center" valign="middle">
                <table border="0">
                  <tr>
                    <jato:content name="ButtonsLayout">
                    <td align="center" valign="middle">
                      <console:button name="TaxUpdate" />
                    </td>
                    <td align="center" valign="middle">
                      <console:button name="TaxAddChild" />
                    </td>
                    <td align="center" valign="middle">
                      <console:button name="TaxDelete" />
                    </td>
                    <td align="center">
                      <console:button name="TaxCancel" />
                    </td>
                    </jato:content>
                  </tr>
                </table>
            </td>
        </tr>
       </table>
      </jato:containerView>
  </jato:content>
  <BR>
 </jato:content>
</jato:treeView>
  <jato:content name="browseMode">
  <table align="center" width="100%" border="0" cellspacing="0" cellpadding="0">
    <TR> 
      <TD valign="bottom" width="100%"> 
        <TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
	  <TR> 
	    <TD valign="bottom" class="properties-separator"><IMG src="../ps/searchadmin/images/blank.gif" width="1" height="2" alt=""></TD>
          </TR>
        </TABLE>
      </TD>
    </TR>
  </TABLE>
  <table cellpadding="0" cellspacing="0" width="100%" align="center" border="0">
    <tr> 
      <td width="50%" height="2"><br>
      </td>
      <td align="right" width="50%" height="2"> 
        <table border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td align="right">
              <console:button name="TaxSave" />
            </td>
            <td align="right">
              <console:button name="TaxReset" />
            </td>
            <td align="right">
              <console:button name="TaxReindex" onClick="javascript:runAction(); return false;"/>
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  </jato:content>


  </console:form>
 </body>
<script language="javascript">
pageLoaded = 1;
</script>

</html>
</jato:useViewBean>
