Johannes Theiner 59d944fccd fully working version
Signed-off-by: Johannes Theiner <j.theiner@live.de>
2019-05-17 20:56:01 +02:00

62 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: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">
<h:form>
<h:commandLink action="#{categoryBean.back}" value="zurück zur Auswahl" rendered="#{not empty categoryBean.category}"/>
<h:panelGroup layout="block" styleClass="m-row" rendered="#{empty categoryBean.category}">
<h1 class="m-text-center">Kategorien</h1>
<ui:repeat value="#{categoryBean.categories}" var="category">
<div class="m-col-t-3">
<h:commandLink action="#{categoryBean.select}">
<figure class="m-figure">
<f:setPropertyActionListener target="#{categoryBean.category}" value="#{category}"/>
<h:graphicImage value="https://source.unsplash.com/#{category.image}/900x900"/>
<figcaption class="m-text-center">
#{category.name}
</figcaption>
</figure>
</h:commandLink>
</div>
</ui:repeat>
</h:panelGroup>
<h:panelGroup layout="block" styleClass="m-row" rendered="#{not empty categoryBean.category}">
<h1 class="m-text-center">#{categoryBean.category.name}</h1>
<!--<h:graphicImage value="https://source.unsplash.com/#{categoryBean.category.image}/100x100"/>-->
<ui:repeat value="#{categoryBean.books}" var="book">
<div class="m-col-t-3">
<h:commandLink action="#{bookBean.select}">
<figure class="m-figure">
<f:setPropertyActionListener target="#{categoryBean.book}" value="#{book}"/>
<h:graphicImage value="https://source.unsplash.com/#{book.image}/900x900"/>
<figcaption class="m-text-center">
#{book.title}
</figcaption>
</figure>
</h:commandLink>
</div>
</ui:repeat>
</h:panelGroup>
</h:form>
</ui:define>
</ui:composition>
</f:view>
</html>