<%--
  /**
   * Copyright (c) 2003 by Sun Microsystems, Inc. All rights reserved.
   * Use is subject to license terms.
   *
   * "@(#)volume_search_results.jsp    1.12    03/09/17     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="main.menu.title"/>
    </title>
</head>

<%@include file="/layout/bodytag.jsp"%>
<%@include file="/layout/top.jsp"%>
<%@include file="/layout/breadcrumb.jsp"%>
<%@include file="/layout/spacer.jsp"%>
<% selectedSubItem = "volumeresults"; %>
<html:form action="/volumeresults.do">

<!-- hidden element which specifies the action for this form -->
<input type="hidden" name="request_action" value="<%=request.getAttribute("request_action")%>">

<div class="content-layout">
  <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="search.table.criteria"/>
              </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>
    <tr>
      <td><img alt border="0" height="5" src="/images/general/dot.gif" width="1"></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="8" width="1" src="images/general/dot.gif"></td>
  </tr>
</table>
  
<!-- search criteria table -->
<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td><bean:message key="search.item"/>&nbsp;
    <bean:message key="item.type.volume"/>
    <img alt border="0" height="8" width="1" src="images/general/dot.gif">
    <img alt border="0" height="8" width="1" src="images/general/dot.gif">
    <bean:message key="search.criteria"/>&nbsp;<bean:write name="Search" property="criteria"/>
    <img alt border="0" height="8" width="1" src="images/general/dot.gif">
    <img alt border="0" height="8" width="1" src="images/general/dot.gif">
    <bean:message key="search.phrase"/>&nbsp;<bean:write name="Search" property="searchText"/></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="8" width="1" src="images/general/dot.gif"></td>
  </tr>
</table>

  <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="search.results.header.volume"/>
              </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>
    <tr>
      <td><img alt border="0" height="5" src="/images/general/dot.gif" width="1"></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="8" width="1" src="images/general/dot.gif"></td>
  </tr>
</table>


      <table>      
          <!-- only show paging links if the list is long enough -->
            <%@include file="/layout/prevnext.jsp"%>   
          <tr>
            <td nowrap>
              <table class="back-table" border="0" cellspacing="0" cellpadding="1" width="100%">
                <tr>
                  <td>
                    <table class="front-table" border="0" cellspacing="0" cellpadding="0" width="100%">
                      <tr class="header-row">
                        <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.system.array.name"/>
                          </div>
                     </td>
                     <td nowrap>
                       <div class="table-header-text">
                          <bean:message key="storage.mgmt.volumes.capacity" />
                       </div>
                     </td>
                     <td nowrap>
                       <div class="table-header-text">
                          <bean:message key="storage.mgmt.volumes.status" />
                       </div>
                     </td>

                      </tr>                                           
                      <logic:present name="<%=Constants.HttpSessionFields.VOLUME_LIST%>">         
                        <%
                          Integer begin = (Integer)request.getAttribute("beginIndex");
                          String beginIndex = "0";
                          if(begin != null) {
                            beginIndex = begin.toString();
                          }
                          Integer maxrows = (Integer)request.getAttribute("maxRowsPerListing");
                          String max = "0";
                          if(maxrows != null) {
                            max = maxrows.toString();
                          }
                        %>
 		 	 <logic:iterate id="volume" name="<%=Constants.HttpSessionFields.VOLUME_LIST%>" 
			 	type="StorageVolumeInterface" 
				indexId="index" offset='<%=beginIndex%>' length='<%=max%>'>
                           <tr>                             
                            <td align="left" nowrap>
                             <div class="table-normal-text">
                            <a href="root.menu.item0.item4edit.do?name=<bean:write name='volume' property='name'/>&t4Name=<bean:write name='volume' property='t4Name'/>">
                                  <bean:write name="volume" property="name"/>
                            </a>
                          </div>
                        </td>
                        <td align="left">
                          <div class="table-normal-text">
                              <bean:write name="volume" property="t4Name"/>
                          </div>
                        </td>

                        <td nowrap>
                          <div class="table-normal-text">
                            <component:volumeSizeDisplay size="<%=volume.getSize().toString()%>"/>
                          </div>
                        </td>
                        <td align="left" nowrap>
                          <div class="table-normal-text">
                            <bean:message key='<%="storage.mgmt.volumes.status." + volume.getStatus()%>' />
                          </div>

                        </td>
                         </tr>
                        </logic:iterate>
                      </logic:present>
                    </table>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
            <%@include file="/layout/prevnext.jsp"%>   
        </table>
</div>

<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><img alt border="0" height="20" width="1" src="images/general/dot.gif"></td>
  </tr>
</table>

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