<%--
  /**
   * Copyright (c) 2003 by Sun Microsystems, Inc. All rights reserved.
   * Use is subject to license terms.
   *
   * "@(#)sm_createpoolwiz_selecttray.jsp    1.12    03/06/02     SMI"
   * 
   */
 --%>
<%@ include file="/layout/toptags.jsp"%>
<html:html>

<head>
<%@include file="/layout/page_head_section.jsp"%>
</head>

<%@ include file="/layout/wizard_body_tag.jsp" %>
<html:form action="/CreatePoolWizard.do">
<%@ include file="/wizard/wizard_framework_fields.jsp"%>

<div class="content-layout">

<%@ include file="/layout/user_messages.jsp"%>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr class="wizard-content-title-row">
    <td>
      <div class="wizard-content-title-text">
        <bean:message key="storage.mgmt.pools.createwizard.trays.header" arg0="<%=((T4Interface)session.getAttribute(Constants.HttpSessionFields.CURRENT_T4)).getName()%>"/>
      </div>
    </td>
  </tr>
  <tr>
    <td class="wizard-content-divider"><img alt width="1" height="1" src="/images/general/dot.gif" border="0"></td>
  </tr>
</table>

<% if(session.getAttribute("disableNext") == null) { %>
 <!-- spacer between two sections -->
<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td><img alt border="0" height="20" width="1" src="images/general/dot.gif"></td>
  </tr>
</table>

<%@ page import="com.sun.netstorage.array.mgmt.cfg.ui.forms.ProfileForm"%>
  <!-- spacer between two sections -->
<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <%
      String profile = 
         ((T4Interface)session.getAttribute(
             Constants.HttpSessionFields.CURRENT_T4)).getProfile().getName();
      MessageResources messages = 
		    (MessageResources) application.getAttribute(Action.MESSAGES_KEY);
      String localizedProfileName =
         "<b>" + messages.getMessage(request.getLocale(), profile) + "</b>"; 
    %>
    <td><bean:message key="storage.mgmt.pools.createwizard.trays.msg" arg0='<%=localizedProfileName%>'/>
    </td>
  </tr>
</table>


<!-- spacer between two sections -->
<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td><img alt border="0" height="20" width="1" src="images/general/dot.gif"></td>
  </tr>
</table>


 
  <table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td nowrap>
        <table border="0" cellspacing="0" cellpadding="0">          
          <tr>
            <td><img alt width="1" height="2" border="0" src="images/general/dot.gif"></td>
          </tr>
          <tr>
            <td nowrap>
              <table class="back-table" border="0" cellspacing="0" cellpadding="1">
                <tr>
                  <td>
                    <table class="front-table" border="0" cellspacing="0" cellpadding="0">
                     <logic:present name="CreatePool" property="traysWithSpaceList">
                      <tr class="header-row">
                        <td></td>
                        <td nowrap>
                          <div class="table-header-text">
                            <bean:message key="tray.table.id"/>
                          </div>
                        </td>      
                        <td nowrap>
                          <div class="table-header-text">
                            <bean:message key="tray.table.type"/> 
                          </div>
                        </td>       
                        <td nowrap>
                          <div class="table-header-text">
                            <bean:message key="tray.table.drivenum.short"/> 
                          </div>
                        </td>           
                        <td nowrap>
                          <div class="table-header-text">
                           <bean:message key="tray.table.drivecapacity"/> 
                          </div>
                        </td>
                                              
                        
                      </tr>
                      <!-- Begin tray row listing(s) -->                                                    
                                                                                      
 				 	    <logic:iterate id="trayW" name="CreatePool" property="traysWithSpaceList" type="TrayWrapper" indexId="idx">
                          <tr>           
                            <td>
                              <% if(idx.intValue() == 0) { %>
                              <input type="radio" checked name="index" value="<%=idx%>">
                              <% } else { %>
                                <input type="radio" name="index" value="<%=idx%>">
                             <% } %>
                            </td>                  
                            <td align="center">                         
                                <bean:write name="trayW" property="tray.id"/>
                            </td>     
                            <td align="center">                         
                                <%
                                  String type = "tray.type." + trayW.getTray().getTrayType();
                                %>
                                <bean:message key="<%=type%>"/>
                            </td>  
                            <td align="center">                         
                                <bean:write name="trayW" property="tray.numberOfDrives"/>
                            </td>                    
                            <td align="center">
                                <%=nf.format(nf.parse(Convert.bytesToGB(trayW.getTray().getDriveCapacity())))%>     
                                <bean:message key="size.GB"/>                                           
                            </td>                                                            
                         </tr>
                        </logic:iterate>
                        
                      </logic:present>                
                    </table>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
<!-- spacer between two sections -->
<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td><img alt border="0" height="20" width="1" src="images/general/dot.gif"></td>
  </tr>
</table>

<!-- spacer between two sections -->
<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td><bean:message key="storage.mgmt.pools.createwizard.trays.directions"/></td>
  </tr>
</table>
<% } //end if there are trays with space %>
</div>

</html:form>
</body>

</html:html>
