<%--
  /**
   * Copyright (c) 2003 by Sun Microsystems, Inc. All rights reserved.
   * Use is subject to license terms.
   *
   * "@(#)sa_volgrp_createwiz_setname.jsp    1.9    03/09/18     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"%>
</head>
<%@ include file="/layout/wizard_body_tag.jsp" %>
<%@ include file="/layout/user_messages.jsp"%>
<html:form action="/CreateVolumeGroupWizard.do">
<%@ include file="/wizard/wizard_framework_fields.jsp"%>
<%
 com.sun.netstorage.array.mgmt.cfg.ui.forms.VolumeGroupCreateForm form = 
 (com.sun.netstorage.array.mgmt.cfg.ui.forms.VolumeGroupCreateForm)
    session.getAttribute("VolumeGroupCreate"); 
%>
<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="create.volume.group.wizard.setname"/>
      </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>
   <td>
    <!-- show appropriate message if there are no volumes to add-->
    <logic:notPresent name="VolumeGroupCreate" property="volumes">
      <bean:message key="create.volume.group.wizard.setname.instructions.novolumes"/>
    </logic:notPresent>
    <logic:present name="VolumeGroupCreate" property="volumes">
      <bean:message key="create.volume.group.wizard.setname.instructions"/>
    </logic:present>
   </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" width="50%">
  <tr>
    <td>
      <table class="front-table" border="0" cellspacing="0" cellpadding="0" width="100%">

        <tr class="header-row">
          <td>
            <div class="table-header-text">
              <bean:message key="detail.property"/>
            </div>
          </td>
          <td>
            <div class="table-header-text">
              <bean:message key="detail.value"/>
            </div>

          </td>
        </tr>
        <tr>
          <td align="left" nowrap>
            <div class="table-label-text">
              <bean:message key="storage.access.volume.groups.table.name"/>
            </div>
          </td>
          <td align="left" nowrap>

            <% String maxLen = "" + Constants.ObjectValidation.DEFAULT_MAX;%>
            <div class="table-label-text">
              <html:text property="volumeGroupName" maxlength="<%=maxLen%>"/>
            </div>
          </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>

<!-- volumes listing -->
<logic:present name="VolumeGroupCreate" property="volumes">
  <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="create.volume.group.wizard.volumes" />
              </div>
            </td>           
          </tr>
        </table>
      </td>
    </tr>
      <tr>
      <td nowrap>
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><img alt width="1" height="8" 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">
                      <tr class="header-row">
                        <td nowrap></td>
                        <td nowrap>
                          <div class="table-header-text">
                            <bean:message key="storage.mgmt.volumes.name"/>
                          </div>
                        </td>
                        <td nowrap>
                          <div class="table-header-text">
                            <bean:message key="storage.mgmt.volumes.status"/>
                          </div>
                        </td>
                        <td nowrap>
                          <div class="table-header-text">
                            <bean:message key="storage.mgmt.volumes.size"/>
                          </div>
                        </td>                        
                      </tr>
                      <logic:iterate indexId="index" id="vol" name="VolumeGroupCreate" property="volumes"
                      		type="StorageVolumeInterface">
                      <tr>
                        <td align="left" nowrap>
                          <div class="table-normal-text">
                            <!-- check to see if the checkbox should be selected -->
                            <input <%=form.getVolumeCheckboxStatus(index)%> type="checkbox" name="selectedVolumeIndices" value="<%=index%>"/>
                        </td>
                        <td align="left" nowrap>
                          <div class="table-normal-text">
                            <bean:write name="vol" property="name"/>
                          </div>
                        </td>
                        <td align="left" nowrap>
                          <div class="table-normal-text">
                            <bean:message key='<%="storage.mgmt.volumes.status." + vol.getStatus()%>' />
                          </div>
                        </td>                        
                        <td align="left" nowrap>
                          <div class="table-normal-text">
                            <component:volumeSizeDisplay size="<%=vol.getSize().toString()%>"/>
                          </div>
                        </td>                        
                      </tr>
                      </logic:iterate>
                    </table>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
      </td>

  </tr>
</table>
</logic:present>

</div>

</html:form>
</body>

</html:html>
