-<%--
- Document : index
- Created on : 04.08.2015, 10:33:10
- Author : Roland Haeder
---%>
-
-<%--<%@page errorPage="errorHandler.jsp" %>--%>
-<%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaBean"%>
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@taglib prefix="basket" uri="http://mxchange.org/jshop/tags/basket" %>
-
-<jsp:useBean id="controller" scope="session" class="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean" type="PizzaBean" />
-
-<jsp:setProperty name="controller" property="application" value="${pageContext.servletContext}" />
-<jsp:setProperty name="controller" property="basket" value="${basket}" />
-<%
- // TODO: Can be removed later
- controller.init();
-%>
-
-<c:set var="basePath" value="${pageContext.request.contextPath}" />
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <link rel="stylesheet" href="${basePath}/style.css" type="text/css" />
- <title>Pizza-Service - Willkommen</title>
- </head>
-
- <body>
- <div id="header">
- <div id="title">
- <h1>Pizza-Service - Willkommen</h1>
- </div>
- </div>
-
- <jsp:include page="/static/guest/guest_menu.jsp" flush="false" />
-
- <div id="content_outer">
- <div id="content_title">
- <h2>Eingangsseite (dummy):</h2>
- </div>
-
- <div id="content">
- <!-- TODO: Missing in xhtml: //-->
- <basket:mini_basket basket="${basket}" />
-
- <table class="table">
- <thead>
- <tr>
- <th colspan="4" class="table_header">
- Folgendes kann bestellt werden:
- </th>
- </tr>
- </thead>
-
- <tbody>
- <tr>
- <th class="table_header_column">
- Bestellen?
- </th>
- <th class="table_header_column">
- Anzahl:
- </th>
- <th class="table_header_column">
- Produkt:
- </th>
- <th class="table_header_column">
- Einzelpreis:
- </th>
- </tr>
- </tbody>
- </table>
-
- <c:forEach var="product" items="${controller.availableProductsIterator}">
- <c:choose>
- <c:when test="${controller.basket.isAdded(product)}">
- <c:set var="item" value="${controller.basket.item}" />
- <table class="table">
- <tbody>
- <tr>
- <td class="table_data_column">
- <a href="${basePath}/basket.jsp" title="Zum Warenkorb">Warenkorb</a>
- </td>
- <td class="table_data_column">
- ${item.amount}
- </td>
- <td class="table_data_column">
- ${product.title}
- </td>
- <td class="table_data_column" align="right">
- <fmt:formatNumber type="currency" minFractionDigits="2" maxFractionDigits="2" value="${product.price}" />
- </td>
- </tr>
- </tbody>
- </table>
- </c:when>
- <c:otherwise>
- <form action="${basePath}/form_handler/add_item.jsp" accept-charset="utf-8" id="form" method="post">
- <table class="table">
- <tbody>
- <tr>
- <td class="table_data_column">
- <input class="submit" type="submit" name="add" value="Hinzufügen" />
- <input type="hidden" name="itemId" value="${product.itemId}" />
- <input type="hidden" name="itemType" value="Product" />
- </td>
- <td class="table_data_column">
- <input class="input" type="text" name="amount" size="3" maxlength="20" />
- </td>
- <td class="table_data_column">
- ${product.title}
- </td>
- <td class="table_data_column" align="right">
- <fmt:formatNumber type="currency" minFractionDigits="2" maxFractionDigits="2" value="${product.price}" />
- </td>
- </tr>
- </tbody>
- </table>
- </form>
- </c:otherwise>
- </c:choose>
- </c:forEach>
- </div>
- </div>
-
- <jsp:include page="/static/guest/guest_footer.jsp" flush="false" />
- </body>
-</html>