Johannes Theiner 6d6a1c9b2a ordering process done
Signed-off-by: Johannes Theiner <j.theiner@live.de>
2019-06-05 18:41:59 +02:00

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}&#8364;</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}&#8364;</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>