69 lines
2.8 KiB
HTML
69 lines
2.8 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
|
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
|
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
|
|
xmlns:f="http://xmlns.jcp.org/jsf/core">
|
|
<f:view>
|
|
<ui:composition template="template.xhtml">
|
|
<ui:define name="content">
|
|
<div class="m-row">
|
|
<h1 class="m-text-center">Warenkorb</h1>
|
|
</div>
|
|
|
|
<ui:repeat value="#{cartBean.items}" var="item">
|
|
|
|
|
|
<div class="m-row m-block">
|
|
<div class="m-col-t-4">
|
|
<img src="https://source.unsplash.com/#{item.article.image}/100x100" class="m-image" alt="Buchcover"/>
|
|
</div>
|
|
<div class="m-col-t-4">
|
|
<h3>#{item.article.title}</h3>
|
|
</div>
|
|
<div class="m-col-t-4">
|
|
<div class="m-row">
|
|
<h4 class="m-text-right">#{item.article.priceString}€</h4>
|
|
</div>
|
|
<div class="m-row">
|
|
<div class="m-col-t-4 m-push-t-6">
|
|
<input type="number" name="quantity" value="#{item.count}" min="1" max="10"/>
|
|
</div>
|
|
</div>
|
|
<div class="m-row">
|
|
<div class="m-col-t-4 m-push-t-6 m-button m-small m-danger">
|
|
<h:form>
|
|
<h:commandLink action="#{cartBean.remove(item)}">
|
|
Entfernen
|
|
</h:commandLink>
|
|
</h:form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ui:repeat>
|
|
|
|
|
|
<h:panelGroup layout="block" styleClass="m-row" rendered="#{cartBean.itemCount != 0}">
|
|
<div class="m-col-t-5 m-push-t-7">
|
|
<h1 class="m-text-right">Summe(#{cartBean.itemCount} Items): #{cartBean.sum}€</h1>
|
|
</div>
|
|
</h:panelGroup>
|
|
|
|
<h:panelGroup layout="block" styleClass="m-row" rendered="#{cartBean.itemCount == 0}">
|
|
<h1 class="m-text-center">Der Warenkorb ist Leer</h1>
|
|
</h:panelGroup>
|
|
|
|
|
|
<h:panelGroup layout="block" styleClass="m-row" rendered="#{cartBean.itemCount != 0}">
|
|
<div class="m-col-t-4 m-push-t-4 m-button m-success">
|
|
<a href="addressSelection.xhtml">Jetzt Kaufen</a>
|
|
</div>
|
|
</h:panelGroup>
|
|
|
|
</ui:define>
|
|
</ui:composition>
|
|
</f:view>
|
|
</html>
|