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"
10 xmlns:basket="http://mxchange.org/jshop/tags/basket"
13 <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
14 <ui:define name="title">#{msg.PAGE_TITLE_INDEX_WELCOME}</ui:define>
16 <ui:define name="menu">
17 <ui:include id="menu" class="guest_menu" src="/WEB-INF/templates/guest/guest_menu.tpl" />
20 <ui:define name="content_header">
21 #{msg.SUB_TITLE_INDEX_WELCOME}
24 <ui:define name="content">
26 <div class="table_header">
27 #{msg.FOLLOWING_PRODUCTS_ARE_AVAILABLE}
31 <h:dataTable value="#{controller.availableProducts}" var="product" class="table">
33 <div id="main_item_container">
34 <div class="item_title">
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="#{msg.ADMIN_ADD_ITEM_TO_BASKET}" action="#{basketController.addItem(product)}" title="#{msg.BUTTON_TITLE_ADD_ITEM_TO_BASKET}" />
45 <h:inputText class="input" id="amount" size="3" maxlength="20" value="#{basketController.amount}" title="#{msg.INPUT_TITLE_ENTER_ITEM_AMOUNT}">
47 If the customer wants to order more, he need to call in.
49 <f:validator for="amount" validatorId="ItemAmountValidator" />
54 <ui:fragment rendered="#{basketController.isProductAdded(product)}">
55 <div class="item_amount">
57 #{basketController.getItemAmount(product)}
60 <div class="item_basket_link">
61 <h:link outcome="basket" title="#{msg.LINK_TO_BASKET_TITLE}" value="#{msg.LINK_CHANGE_IN_BASKET}" />
64 <div class="clear"></div>
69 <div class="table_right">
70 <div class="item_price">
71 #{msg.SINGLE_ITEM_PRICE}
72 <h:outputText class="price" value="#{product.price}">
73 <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />
77 <div class="item_total_price">
78 #{msg.TOTAL_ITEM_PRICE}
79 <h:outputText class="price" value="#{msg.ITEM_NOT_ORDERED}" 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" />
86 <div class="clear"></div>
92 <div id="totals_container">
93 #{msg.TOTAL_ORDER_PRICE}
94 <h:outputText class="price" id="total_sum" value="#{basketController.calculateTotalPrice()}">
95 <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />
100 <ui:define name="footer">
101 <ui:include id="footer" class="guest_footer" src="/WEB-INF/templates/guest/guest_footer.tpl" />