- <!--
- TODO Not used!
- <h:panelGrid class="basket_item_table" columnClasses="table_data_column" headerClass="table_header_column">
- <f:facet name="header">
- Bestellen? Bestellmenge: Produkt: Einzelpreis:
- </f:facet>
- </h:panelGrid>
- //-->
-
- <table class="basket_item_table">
- <thead>
- <tr>
- <th colspan="5" class="table_header">
- Folgendes kann bestellt werden:
- </th>
- </tr>
-
- <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>
-
- <th class="table_header_column">
- Zwischensumme:
- </th>
- </tr>
- </thead>
-
- <tbody>
- <ui:repeat var="product" value="#{controller.availableProducts}">
- <h:form acceptcharset="utf-8" id="add_item">
-
- <f:viewAction action="#{basket.setCurrentProduct(product)}" />
-
- <ui:fragment rendered="#{basket.isCurrentProductAdded() == true}">
- <tr>
- <td class="table_data_column">
- <h:link outcome="basket" title="Zum Warenkorb" value="Warenkorb" />
- </td>
-
- <td class="table_data_column">
- #{basket.currentItem.amount}
- </td>
-
- <td class="table_data_column">
- #{product.title}
- </td>
-
- <td class="table_data_column" align="right">
- <h:outputText class="price" value="#{product.price}">
- <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" />
- </h:outputText>
- </td>
-
- <td class="table_data_column" align="right">
- <h:outputText class="price" value="#{controller.calculateTotalPrice(basket.currentItem)}">
- <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" />
- </h:outputText>
- </td>
- </tr>
- </ui:fragment>
-
- <ui:fragment rendered="#{basket.isCurrentProductAdded() == false}">
- <tr>
- <td class="table_data_column">
- <h:commandButton class="submit" id="add" value="Hinzufügen" action="#{basket.addToBasket(product)}" />
- <h:inputHidden id="itemId" value="#{product.itemId}" />
- <h:inputHidden id="itemType" value="Product" />
- </td>
-
- <td class="table_data_column">
- <h:inputText class="input" id="amount" size="3" maxlength="20">
- <!--
- If the customer wants to order more, he need to call in.
- //-->
- <f:validateLongRange minimum="1" maximum="10" />
- </h:inputText>
- </td>
-
- <td class="table_data_column">
- #{product.title}
- </td>
-
- <td class="table_data_column" align="right">
- <h:outputText class="price" value="#{product.price}">
- <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" />
- </h:outputText>
- </td>
-
- <td class="table_data_column" align="right">
- -
- </td>
- </tr>
- </ui:fragment>
- </h:form>
- </ui:repeat>
- </tbody>
- </table>
- </ui:define>
-
- <ui:define name="footer">
- <ui:include id="footer" class="guest_footer" src="/WEB-INF/templates/guest/guest_footer.tpl" />
+ <div class="table">
+ <div class="table_header">
+ #{msg.FOLLOWING_PRODUCTS_ARE_AVAILABLE}
+ </div>
+ </div>
+
+ <h:dataTable id="table_show_available_products" var="product" value="#{controller.availableProducts}" styleClass="table" summary="#{msg.TABLE_SUMMARY_INDEX_PRODUCTS}">
+ <h:column>
+ <div id="main_item_container">
+ <div class="item_title">
+ #{product.productTitle}
+ </div>
+
+ <div class="item_content">
+ <div class="table_left">
+ <div class="item_actions">
+ <ui:fragment rendered="#{!basketController.isProductAdded(product)}">
+ <h:form id="add_item">
+ <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}" />
+
+ <h:inputText class="input" id="amount" size="3" maxlength="20" value="#{basketController.orderedAmount}" title="#{msg.INPUT_TITLE_ENTER_ITEM_AMOUNT}">
+ <!--
+ If the customer wants to order more, he need to call in.
+ //-->
+ <f:validator for="amount" validatorId="ItemAmountValidator" />
+ </h:inputText>
+ </h:form>
+ </ui:fragment>
+
+ <ui:fragment rendered="#{basketController.isProductAdded(product)}">
+ <div class="item_amount">
+ Anzahl:
+ #{basketController.getItemAmount(product)}
+ </div>
+
+ <div class="item_basket_link">
+ <h:link outcome="basket" title="#{msg.LINK_TO_BASKET_TITLE}" value="#{msg.LINK_CHANGE_IN_BASKET}" />
+ </div>
+
+ <div class="clear"></div>
+ </ui:fragment>
+ </div>
+ </div>
+
+ <div class="table_right">
+ <div class="item_price">
+ #{msg.SINGLE_ITEM_PRICE}
+ <h:outputText class="price" value="#{product.price}">
+ <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />
+ </h:outputText>
+ </div>
+
+ <div class="item_total_price">
+ #{msg.TOTAL_ITEM_PRICE}
+ <h:outputText class="price" value="#{msg.ITEM_NOT_ORDERED}" rendered="#{!basketController.isProductAdded(product)}" />
+ <h:outputText class="price" value="#{basketController.calculateCurrentItemPrice()}" rendered="#{basketController.isProductAdded(product)}">
+ <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />
+ </h:outputText>
+ </div>
+ </div>
+
+ <div class="clear"></div>
+ </div>
+ </div>
+ </h:column>
+ </h:dataTable>
+
+ <div id="totals_container">
+ #{msg.TOTAL_ORDER_PRICE}
+ <h:outputText class="price" id="total_sum" value="#{basketController.calculateTotalPrice()}">
+ <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />
+ </h:outputText>
+ </div>