Internet-Technologien/src/main/webapp/confirmation.xhtml
Johannes Theiner 6d6a1c9b2a ordering process done
Signed-off-by: Johannes Theiner <j.theiner@live.de>
2019-06-05 18:41:59 +02:00

75 lines
3.0 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">Bestellbestätigung</h1>
</div>
<div class="m-row">
<div class="m-col-t-3 m-block">
<h4>Addresse:</h4>
#{addressBean.selected.name}<br/>
#{addressBean.selected.street} #{addressBean.selected.number}<br/>
#{addressBean.selected.zipCode} #{addressBean.selected.city}
</div>
<div class="m-col-t-4 m-block m-push-t-5">
<h4>#{paymentBean.selected.type.name}</h4>
<h:panelGroup layout="block" rendered="#{paymentBean.selected.type.name eq 'CreditCard'}">
Inhaber: #{paymentBean.selected.owner}<br/>
Nummer : #{paymentBean.selected.number} / #{paymentBean.selected.checksum}
gültig bis: #{paymentBean.selected.expiration}
</h:panelGroup>
<h:panelGroup layout="block" rendered="#{paymentBean.selected.type.name eq 'PayPal'}">
Konto: #{paymentBean.selected.email}
</h:panelGroup>
</div>
</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">
<h4 class="m-text-right">#{item.count} x #{item.article.priceString}&#8364;</h4>
</div>
</div>
</ui:repeat>
<h:panelGroup layout="block" styleClass="m-row">
<div class="m-col-t-5 m-push-t-7">
<h1 class="m-text-right">Summe: #{cartBean.sum}&#8364;</h1>
</div>
</h:panelGroup>
<div class="m-row">
<div class="m-col-t-3 m-push-t-3 m-button m-danger">
<a href="cart.jsf">Abbrechen</a>
</div>
<div class="m-col-t-3 m-push-t-3 m-button m-success">
<h:form>
<h:commandLink action="#{cartBean.buy}">Bestätigen</h:commandLink>
</h:form>
</div>
</div>
</ui:define>
</ui:composition>
</f:view>
</html>