<%--
  /**
   * Copyright (c) 2003 by Sun Microsystems, Inc. All rights reserved.
   * Use is subject to license terms.
   *
   * "@(#)sa_select_target_arrays.jsp    1.10    03/09/10     SMI"
   * 
   */
 --%>
<%@ page import="com.sun.netstorage.array.mgmt.cfg.ui.forms.ImportForm"%>
<%@ 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="sa.import.target.header"/>
    </title>
</head>

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

<%@include file="/layout/top.jsp"%>
<%@include file="/layout/breadcrumb.jsp"%>
<%@include file="/layout/spacer.jsp"%>

<html:form action="/root.menu.item1.item1seltargets.do">
<% 
   ImportForm form = (ImportForm)session.getAttribute("Import");
   boolean hasList = form.getArrays() != null && !form.getArrays().isEmpty();
%>

<input type="hidden" name="request_action" value="<%=request.getAttribute("request_action")%>">
<div class="content-layout">
<%@ include file="/layout/user_messages.jsp"%>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td>
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td nowrap>
              <div class="major-category-text">
                <bean:message key="sa.import.target.header"/>
              </div>
            </td>
           
            <td valign="bottom" width="99%">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td class="property-separator" valign="bottom"><img alt border="0" height="2" src="/images/general/dot.gif" width="1"></td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    
  </table> 
  

<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td><bean:message key="sa.import.target.instructions"/></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>

<!-- buttons -->
<table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td nowrap>
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td align="left" valign="middle">
              <table border="0" cellpadding="0" cellspacing="0">
                <tr>                  
                  <td>
                    <table border="0" cellpadding="1" cellspacing="0" class="button-link-enabled-text">
                      <tr>
                        <td>
                          <table>
                            <tr>
                              <td align="center" valign="middle" nowrap>                                         
                                <component:button text="sa.import.target.button" href="javascript:submitForm('import');" title="sa.import.target.button" isEnabled="<%=!readOnly%>" />
                              </td>
                            </tr>
                          </table>
                        </td>
                      </tr>
                    </table>
                  </td>
                  <td width="10"><img alt width="10" height="1" border="0" src="images/general/dot.gif"></td>                  
                </tr>
              </table>
            </td>           
          
            <td>
             <table border="0" cellpadding="0" cellspacing="0">
                <tr>                  
                  <td>
                    <table border="0" cellpadding="1" cellspacing="0" class="button-link-enabled-text">
                      <tr>
                        <td>
                          <table>
                            <tr>
                              <td align="center" valign="middle" nowrap>         
                                <component:button text="button.cancel" href="javascript:document.forms[0].action='root.menu.item1.item1seligs.do';document.forms[0].submit();" title="button.cancel" isEnabled="true" />
                              </td>
                            </tr>
                          </table>
                        </td>
                      </tr>
                    </table>
                  </td>
                  <td width="10"><img alt width="10" height="1" border="0" src="images/general/dot.gif"></td>                  
                </tr>
              </table>
            </td>
          </tr>
        </table>
      </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 align="center" valign="middle" nowrap><a href="javascript:checkAll(document.forms[0])"><img src="images/icons/select-all-small.gif" alt='<bean:message key="table.select.all"/>' vspace="2" border="0" width="11" height="13"></a><a href="javascript:unCheckAll(document.forms[0])"><img src="images/icons/deselect-all-small.gif" alt='<bean:message key="table.deselect.all"/>' vspace="2" border="0" width="11" height="13"></a></td>                         
           <td>
             <div class="table-header-text">
               <bean:message key="main.menu.t4.summary.name"/>
             </div>
           </td>                        
                       
           <td>
             <div class="table-header-text">
               <bean:message key="main.menu.t4.summary.description"/>
             </div>
           </td>                        
           <td>
             <div class="table-header-text">
              <bean:message key="main.menu.t4.summary.health"/>
             </div>
           </td>
        </tr>
        <% if (!hasList) { %>
           <tr>
               <td colspan="4">
                    <div class="table-normal-text">
                        <bean:message key="sa.import.taget.noarrays" />
                    </div>
               </td>
           </tr>
        <% } else { %>
           <!-- Begin array destination row listing -->               
 	   <logic:iterate id="t4" name="Import" property="arrays" type="T4Interface" indexId="idx">
 		       
               <tr>
                  <td align="center">   
                   <div class="table-normal-text">   
                     <input type="checkbox" name="selectedDests" value="<%=idx%>" <% if(readOnly) {%>disabled <% } %>>
                   </div>
                  </td>   
                  <td align="center">                         
                    <div class="table-normal-text"> 
                     <bean:write name="t4" property="name"/>
                    </div>
                  </td> 
                  <td align="center">                         
                   <div class="table-normal-text"> 
                     <logic:present name="t4" property="description">
                        <bean:write name="t4" property="description"/>
                     </logic:present>
                     <logic:notPresent name="t4" property="description">
                       &nbsp;
                     </logic:notPresent>
                   </div>
                  </td>                                                
                  <td align="center">
                     <div class="table-label-text">
                        <bean:message key='<%="array.health.code." + t4.getHealthStatus()%>' />
                      </div>
                  </td>
               </tr>
            </logic:iterate>
        <% } %>
      </table>
    </td>

  </tr>
</table>

</html:form>
</body>
</div>

</html:html>
