]> git.mxchange.org Git - pizzaservice-war.git/blob - web/index.xhtml
updated jar(s)
[pizzaservice-war.git] / web / index.xhtml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml"
4           xmlns:ui="http://java.sun.com/jsf/facelets"
5           xmlns:h="http://xmlns.jcp.org/jsf/html"
6           xmlns:f="http://xmlns.jcp.org/jsf/core"
7           >
8
9         <!--
10         TODO: Not used:
11         xmlns:basket="http://mxchange.org/jshop/tags/basket"
12         //-->
13
14         <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
15                 <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_WELCOME}</ui:define>
16
17                 <ui:define name="content_header">
18                         #{msg.CONTENT_TITLE_INDEX_WELCOME}
19                 </ui:define>
20
21                 <ui:define name="content">
22                         <div class="table">
23                                 <div class="table_header">
24                                         #{msg.FOLLOWING_PRODUCTS_ARE_AVAILABLE}
25                                 </div>
26                         </div>
27
28                         <h:dataTable id="table_show_available_products" var="product" value="#{productController.availableProducts}" styleClass="table" summary="#{msg.TABLE_SUMMARY_INDEX_PRODUCTS}">
29                                 <h:column>
30                                         <div id="main_item_container">
31                                                 <div class="item_title">
32                                                         #{product.productTitle}
33                                                 </div>
34
35                                                 <div class="item_content">
36                                                         <div class="table_left">
37                                                                 <div class="item_actions">
38                                                                         <ui:fragment rendered="#{!basketController.isProductAdded(product)}">
39                                                                                 <h:form id="add_item">
40                                                                                         <h:commandButton class="submit" id="add" value="#{msg.USER_ADD_ITEM_TO_BASKET}" action="#{basketController.addItem(product)}" title="#{msg.BUTTON_TITLE_ADD_ITEM_TO_BASKET}" />
41
42                                                                                         <h:inputText class="input" id="amount" size="3" maxlength="20" value="#{basketController.orderedAmount}" title="#{msg.INPUT_TITLE_ENTER_ITEM_AMOUNT}">
43                                                                                                 <!--
44                                                                                                 If the customer wants to order more, he need to call in.
45                                                                                                 //-->
46                                                                                                 <f:validator for="amount" validatorId="ItemAmountValidator" />
47                                                                                         </h:inputText>
48                                                                                 </h:form>
49                                                                         </ui:fragment>
50
51                                                                         <ui:fragment rendered="#{basketController.isProductAdded(product)}">
52                                                                                 <div class="item_amount">
53                                                                                         #{msg.ITEM_ORDER_AMOUNT}
54                                                                                         #{basketController.getItemAmount(product)}
55                                                                                 </div>
56
57                                                                                 <div class="item_basket_link">
58                                                                                         <h:link outcome="basket" title="#{msg.LINK_TO_BASKET_TITLE}" value="#{msg.LINK_CHANGE_IN_BASKET}" />
59                                                                                 </div>
60
61                                                                                 <div class="clear"></div>
62                                                                         </ui:fragment>
63                                                                 </div>
64                                                         </div>
65
66                                                         <div class="table_right">
67                                                                 <div class="item_price">
68                                                                         #{msg.SINGLE_PRODUCT_PRICE}
69                                                                         <h:outputText class="price" value="#{product.productPrice}">
70                                                                                 <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />
71                                                                         </h:outputText>
72                                                                 </div>
73
74                                                                 <div class="item_total_price">
75                                                                         #{msg.TOTAL_ITEM_PRICE}
76                                                                         <h:outputText class="price" value="#{msg.ITEM_NOT_ORDERED}" rendered="#{!basketController.isProductAdded(product)}" />
77                                                                         <h:outputText class="price" value="#{basketController.calculateCurrentItemPrice()}" rendered="#{basketController.isProductAdded(product)}">
78                                                                                 <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />
79                                                                         </h:outputText>
80                                                                 </div>
81                                                         </div>
82
83                                                         <div class="clear"></div>
84                                                 </div>
85                                         </div>
86                                 </h:column>
87                         </h:dataTable>
88
89                         <div id="totals_container">
90                                 #{msg.TOTAL_ORDER_PRICE}
91                                 <h:outputText class="price" id="total_sum" value="#{basketController.calculateTotalPrice()}">
92                                         <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />
93                                 </h:outputText>
94                         </div>
95                 </ui:define>
96         </ui:composition>
97 </html>