<%-- 
/**
  * Copyright (c) 2004 Red Hat, Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or any later version.
  *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  * USA
  *
  * Component of: Red Hat Application Server
  * 
  * Initial Developers: Aizaz Ahmed
  *                     Vivek Lakshmanan
  *                     Andrew Overholt
  *                     Matthew Wringe
  * Developers: Greg Lapouchnian
  * 			Patrick Smith
  */
--%>
<%@ page contentType="text/html" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<jsp:include page="common/header.jsp" />

    <!-- Content begins here -->
    <div id="form">

    <div class="formHeader"> Your Account Status </div><br />
        <div class="orderListView" style="background:#e0b080">
            <span class="label" style="text-align:center ; font-weight:bold"> Item </span>
            <span class="quantity" style="text-align:center ; font-weight:bold"> Qty</span>
            <span class="status" style="text-align:center ; font-weight:bold"> Status</span>
            <span class="date" style="text-align:center ; font-weight:bold"> Date Ordered </span>
            <span class="price" style="text-align:center ; font-weight:bold ; color:#000;"> Price</span>
            <div class="spacer" ></div>
    </div>

	<c:forEach var="order" items="${orders}">
		<div class="orderListView">
		<div class="spacer" ></div>
		    <span class="label">

			<a href="<c:url value="/store/viewItem.do"><c:param name="itemId" value="${order.itemId}"/></c:url>"><c:out value="${order.itemName}"/></a>
		
		    </span>
		    <span class="quantity"><c:out value="${order.itemQuantity}"/></span>
		    <span class="status"><c:out value="${order.orderStatus}"/></span>
		    <span class="date"></span>
		    <span class="price"><fmt:formatNumber value="${order.orderCost}" pattern="$#,##0.00" /></span>

	
		    <div class="spacer"></div>
		</div>
	</c:forEach>	

	<c:if test="${orders == null}">
	    <div class="error"> You have not placed any orders</div>
	</c:if>

    <!-- This is necessary to force the parent to expand and include floating divs -->
    <br style="clear:both">
</div>

<jsp:include page="common/footer.jsp" />