]> git.mxchange.org Git - pizzaservice-war.git/blob - web/index.xhtml
f682c0ea2db54c3f116d956176d4bbe104321e94
[pizzaservice-war.git] / web / index.xhtml
1 <html xmlns="http://www.w3.org/1999/xhtml"
2           xmlns:ui="http://java.sun.com/jsf/facelets"
3           xmlns:h="http://xmlns.jcp.org/jsf/html"
4           xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
5           xmlns:f="http://xmlns.jcp.org/jsf/core"
6           >
7
8         <!--
9         TODO: Not used:
10         xmlns:basket="http://mxchange.org/jshop/tags/basket"
11         //-->
12
13         <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
14                 <ui:define name="title">Willkommen!</ui:define>
15
16                 <ui:define name="menu">
17                         <ui:include id="menu" class="guest_menu" src="/WEB-INF/templates/guest/guest_menu.tpl" />
18                 </ui:define>
19
20                 <ui:define name="content_header">
21                         Willkommen zum Pizza-Service
22                 </ui:define>
23
24                 <ui:define name="content">
25                         <div class="table">
26                                 <div class="table_header">
27                                         Folgendes kann bestellt werden:
28                                 </div>
29                         </div>
30
31                         <h:dataTable value="#{controller.availableProducts}" var="product" class="table">
32                                 <h:column>
33                                         <div id="main_item_container">
34                                                 <div class="item_title">
35                                                          #{product.title}
36                                                 </div>
37
38                                                 <div class="item_content">
39                                                         <div class="table_left">
40                                                                 <div class="item_actions">
41                                                                         <ui:fragment rendered="#{!basketController.isProductAdded(product)}">
42                                                                                 <h:form acceptcharset="utf-8" id="add_item">
43                                                                                         <h:commandButton class="submit" id="add" value="Hinzufügen" action="#{basketController.addItem(product)}" title="#{msg.BUTTON_TITLE_ADD_ITEM_TO_BASKET}" />
44
45                                                                                         <h:inputText class="input" id="amount" size="3" maxlength="20" value="#{basketController.amount}" title="#{msg.INPUT_TITLE_ENTER_ITEM_AMOUNT}">
46                                                                                                 <!--
47                                                                                                 If the customer wants to order more, he need to call in.
48                                                                                                 //-->
49                                                                                                 <f:validator for="amount" validatorId="ItemAmountValidator" />
50                                                                                         </h:inputText>
51                                                                                 </h:form>
52                                                                         </ui:fragment>
53
54                                                                         <ui:fragment rendered="#{basketController.isProductAdded(product)}">
55                                                                                 <div class="item_amount">
56                                                                                         Anzahl:
57                                                                                         #{basketController.getItemAmount(product)}
58                                                                                 </div>
59
60                                                                                 <div class="item_basket_link">
61                                                                                         <h:link outcome="basket" title="Zum Warenkorb" value="Im Warenkorb ändern" />
62                                                                                 </div>
63
64                                                                                 <div class="clear"></div>
65                                                                         </ui:fragment>
66                                                                 </div>
67                                                         </div>
68
69                                                         <div class="table_right">
70                                                                 <div class="item_price">
71                                                                         Einzelpreis:
72                                                                         <h:outputText class="price" value="#{product.price}">
73                                                                                 <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />
74                                                                         </h:outputText>
75                                                                 </div>
76
77                                                                 <div class="item_total_price">
78                                                                         Zwischensumme:
79                                                                         <h:outputText class="price" value="Nicht bestellt." rendered="#{!basketController.isProductAdded(product)}" />
80                                                                         <h:outputText class="price" value="#{basketController.calculateCurrentItemPrice()}" rendered="#{basketController.isProductAdded(product)}">
81                                                                                 <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />
82                                                                         </h:outputText>
83                                                                 </div>
84                                                         </div>
85
86                                                         <div class="clear"></div>
87                                                 </div>
88                                         </div>
89                                 </h:column>
90                         </h:dataTable>
91
92                         <div id="totals_container">
93                                 Gesamtsumme:
94                                 <h:outputText class="price" id="total_sum" value="#{basketController.calculateTotalPrice()}">
95                                         <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />
96                                 </h:outputText>
97                         </div>
98                 </ui:define>
99
100                 <ui:define name="footer">
101                         <ui:include id="footer" class="guest_footer" src="/WEB-INF/templates/guest/guest_footer.tpl" />
102                 </ui:define>
103         </ui:composition>
104 </html>