<%--
  /**
   * Copyright (c) 2003 by Sun Microsystems, Inc. All rights reserved.
   * Use is subject to license terms.
   *
   * "@(#)sm_clone_traywiz_selectsource.jsp    1.7    03/06/04     SMI"
   * 
   */
 --%>
<%@ include file="/layout/toptags.jsp"%>
<!-- locale stuff -->
<html:html locale="true">
<!-- end locale -->

<!-- Place Java Script Here -->

<!-- HTML -->
<head>
<%@include file="/layout/page_head_section.jsp"%>
    <title>
        <bean:message  key="clone.tray.wizard.title"/>
    </title>
</head>
<%@ include file="/layout/wizard_body_tag.jsp" %>
<html:form action="/CloneTrayWizard.do">
<%@ include file="/wizard/wizard_framework_fields.jsp"%>

<%@ 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="clone.tray.wizard.sourceheader" 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>
<!-- 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 bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <%
      String localizedProfileName = "";
      try {
        String profileName =
          ((T4Interface)session.getAttribute(
           Constants.HttpSessionFields.CURRENT_T4)).getProfile().getName();
        MessageResources messages = 
            (MessageResources) application.getAttribute(Action.MESSAGES_KEY);
        localizedProfileName =
         "<b>" + messages.getMessage(request.getLocale(), profileName) + "</b>";
      } catch(Exception e) {}
    %>
    <td><bean:message key="clone.tray.wizard.sourcemsg" 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 class="back-table" border="0" cellspacing="0" cellpadding="1">
  <tr>
    <td>
      <table class="front-table" border="0" cellspacing="0" cellpadding="0" width="100%">

        <tr class="header-row">
           <td> </td>                        
           <td>
             <div class="table-header-text">
               <bean:message key="tray.table.id"/>
             </div>
           </td>                                               
           <td>
             <div class="table-header-text">
               <bean:message key="tray.table.type"/>
             </div>
           </td>   
            <td>
             <div class="table-header-text">
               <bean:message key="tray.table.drivenum.short"/>
             </div>
           </td>    
            <td>
             <div class="table-header-text">
               <bean:message key="tray.table.drivecapacity"/>
             </div>
           </td>                         
        </tr>
        <!-- Begin tray source row listing -->                
        <logic:present name="CurrentT4">         
           
 		    <logic:iterate id="tray" name="CurrentT4" property="trays" type="TrayInterface" indexId="idx">
 		       
               <tr>
                  <td align="center">     
                   <div class="table-normal-text">
                    <logic:equal name="idx" value="0">                    
                     <input checked type="radio" name="sourceIndex" value="<%= idx %>"/>
                    </logic:equal>
                    <logic:notEqual name="idx" value="0">                    
                     <input type="radio" name="sourceIndex" value="<%= idx %>"/>
                    </logic:notEqual>
                   </div>
                  </td>   
                  <td align="center">                       
                    <div class="table-normal-text">  
                     <bean:write name="tray" property="id"/>
                    </div>
                  </td> 
                  <td align="center">                         
                    <div class="table-normal-text">
                      <%
                          String typeStr = "tray.type." + tray.getTrayType();                                
                      %>
                      <bean:message key="<%=typeStr%>"/>
                    </div>
                  </td> 
                  <td align="center">                         
                    <div class="table-normal-text">
                     <bean:write name="tray" property="numberOfDrives"/>
                    </div>
                  </td> 
                  <td align="center">                         
                   <div class="table-normal-text">
                     <%=nf.format(nf.parse(Convert.bytesToGB(tray.getDriveCapacity())))%> 
                     <bean:message key="size.GB"/>
                   </div>
                  </td>                                                
               </tr>
               
            </logic:iterate>
        </logic:present>
      </table>
    </td>

  </tr>
</table>

</html:form>
</body>

</html:html>
