]> git.mxchange.org Git - pizzaservice-war.git/blobdiff - web/finished.jsp
Added footer for admin area + error include file "direct_call.jsp"
[pizzaservice-war.git] / web / finished.jsp
index 3788ba18b2854b198f63291f4f70496ae27fd5a8..26d3b050d7dc558882aa46e51c7421ef4a45aea7 100644 (file)
        </head>
 
        <body>
-               <div id="title">
-                       <h1><%=PizzaServiceApplication.MAIN_TITLE%> - Vielen Dank!</h1>
+               <div id="header"> 
+                       <div id="title">
+                               <h1><%=PizzaServiceApplication.MAIN_TITLE%> - Vielen Dank!</h1>
+                       </div>
                </div>
 
                <jsp:include page="/static/menu.jsp" flush="true" />
@@ -44,7 +46,7 @@
 
                        <div id="content">
                                <table class="table">
-                                       <thead class="table_header">
+                                       <thead>
                                                <tr>
                                                        <th class="table_header_column">
                                                                Bestellen?
                                                        </th>
                                                </tr>
                                        </thead>
-                                       <tbody class="table_body">
+                                       <tbody>
                                                <%
-                                               // "Walk" over all products
-                                               for (final Product product : app.getProducts()) {
-                                                       // Is it choosen?
-                                                       if (app.isProductChoosen(product, request, session)) {
-                                                               // Mark product as ordered
-                                                               app.markProductAsOrdered(product, session);
-                                                       }
+                                               // Get Iterator
+                                               Iterator<Product> iterator = app.getAvailableProducts();
+
+                                               // "Walk" through all products and unmark them as ordered
+                                               while (iterator.hasNext()) {
+                                                       // Get product instance
+                                                       Product product = iterator.next();
                                                        %>
                                                        <tr>
                                                                <td>
                                                                <td>
                                                                        <%=product.getPrice()%>
                                                                </td>
-                                                               <td>
+                                                               <td align="right">
                                                                        <%=app.getTotalPositionPriceFromRequestSession(product, request, session)%>
                                                                </td>
                                                        </tr>
                                                        <%
                                                }
-                                               float totalPrice = app.calculateTotalPrice(request, session);
                                                %>
                                                <tr>
                                                        <td id="table_total_amount_left">
                                                        <td id="table_total_amount_right">
                                                                <%=app.calculateTotalAmount(request, session)%>
                                                        </td>
-                                                       <td class="spacer">
+                                                       <td>
                                                                &nbsp;
                                                        </td>
                                                        <td id="table_total_sum_left">
                                                                Gesamtpreis:
                                                        </td>
-                                                       <td id="table_total_sum_right">
-                                                               <%=totalPrice%>
+                                                       <td id="table_total_sum_right" align="right">
+                                                               <%=app.calculateTotalPrice(request, session)%>
                                                        </td>
                                                </tr>
 
                                </table>
                        </div>
                </div>
+
+               <jsp:include page="/static/footer.jsp" flush="true" />
        </body>
 </html>