</h:panelGrid>
//-->
- <table class="table">
- <thead>
- <tr>
- <th colspan="4" class="table_header">
- Folgendes kann bestellt werden:
- </th>
- </tr>
- </thead>
-
- <tbody>
- <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>
- </tr>
- </tbody>
- </table>
-
- <ui:repeat var="product" value="#{controller.availableProducts}">
- <c:set var="isAdded" value="#{controller.basket.isAdded(product)}" />
-
- <ui:fragment rendered="#{isAdded == true}">
- <table class="table">
- <tbody>
- <tr>
- <td class="table_data_column">
- <a href="#{basePath}/basket.jsp" title="Zum Warenkorb">Warenkorb</a>
- </td>
-
- <td class="table_data_column">
- #{controller.basket.item.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>
- </tr>
- </tbody>
- </table>
- </ui:fragment>
- <ui:fragment rendered="#{isAdded == false}">
- <h:form acceptcharset="utf-8" id="add_item">
- <table class="table">
- <tbody>
+ <h:form acceptcharset="utf-8" id="add_item">
+ <table class="basket_item_table">
+ <thead>
+ <tr>
+ <th colspan="4" 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}">
+ <c:set var="isAdded" value="#{controller.basket.isAdded(product)}" />
+
+ <ui:fragment rendered="#{isAdded == true}">
+ <tr>
+ <td class="table_data_column">
+ <a href="#{basePath}/basket.jsp" title="Zum Warenkorb">Warenkorb</a>
+ </td>
+
+ <td class="table_data_column">
+ #{controller.basket.item.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.basket.item.calculateTotalPrice()}">
+ <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" />
+ </h:outputText>
+ </td>
+ </tr>
+ </ui:fragment>
+ <ui:fragment rendered="#{isAdded == false}">
<tr>
<td class="table_data_column">
<h:commandButton class="submit" id="add" value="Hinzufügen" action="#{controller.basket.addToBasket(product)}" />
<f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" />
</h:outputText>
</td>
+
+ <td class="table_data_column">
+ -
+ </td>
</tr>
- </tbody>
- </table>
- </h:form>
- </ui:fragment>
- </ui:repeat>
+ </ui:fragment>
+ </ui:repeat>
+ </tbody>
+ </table>
+ </h:form>
</ui:define>
<ui:define name="footer">