parent
6cf6e2f6e3
commit
4abb018703
|
@ -6,6 +6,7 @@ import lombok.NonNull;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
import java.time.Year;
|
import java.time.Year;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,4 +48,12 @@ public class Book {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getAuthorsString(){
|
||||||
|
List<String> names = new ArrayList<>();
|
||||||
|
for (Author author : getAuthors()){
|
||||||
|
names.add(author.getName());
|
||||||
|
}
|
||||||
|
return String.join(",", names);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -31,11 +31,14 @@
|
||||||
alt="Buchcover"/>
|
alt="Buchcover"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="m-col-l-4">
|
<div class="m-col-l-4">
|
||||||
<h1>#{bookBean.book.title}</h1>
|
<h2>#{bookBean.book.title}</h2>
|
||||||
|
<br/>
|
||||||
|
<h1>
|
||||||
|
von #{bookBean.book.authorsString}
|
||||||
|
</h1>
|
||||||
|
<br/>
|
||||||
|
veröffentlicht von #{bookBean.book.publisher.name}
|
||||||
<br/>
|
<br/>
|
||||||
<h2>
|
|
||||||
#{bookBean.authors}
|
|
||||||
</h2>
|
|
||||||
<br/>
|
<br/>
|
||||||
<span>
|
<span>
|
||||||
#{bookBean.book.description}
|
#{bookBean.book.description}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||||
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
||||||
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
|
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
|
||||||
xmlns:f="http://xmlns.jcp.org/jsf/core">
|
xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:c="http://java.sun.com/jsf/html">
|
||||||
<f:view>
|
<f:view>
|
||||||
<ui:composition template="template.xhtml">
|
<ui:composition template="template.xhtml">
|
||||||
<ui:define name="content">
|
<ui:define name="content">
|
||||||
|
@ -17,10 +17,20 @@
|
||||||
|
|
||||||
<div class="m-row m-block">
|
<div class="m-row m-block">
|
||||||
<div class="m-col-t-4">
|
<div class="m-col-t-4">
|
||||||
<img src="https://source.unsplash.com/#{item.article.image}/100x100" class="m-image" alt="Buchcover"/>
|
<img src="https://source.unsplash.com/#{item.article.image}/300x300" class="m-image"
|
||||||
|
alt="Buchcover"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="m-col-t-4">
|
<div class="m-col-t-4">
|
||||||
<h3>#{item.article.title}</h3>
|
<h:form>
|
||||||
|
<h:commandLink action="#{bookBean.select}" styleClass="m-flat">
|
||||||
|
<f:setPropertyActionListener target="#{categoryBean.book}" value="#{item.article}"/>
|
||||||
|
<h2>
|
||||||
|
#{item.article.title} - #{item.article.authorsString}
|
||||||
|
</h2>
|
||||||
|
</h:commandLink>
|
||||||
|
</h:form>
|
||||||
|
<br/>
|
||||||
|
#{item.article.description}
|
||||||
</div>
|
</div>
|
||||||
<div class="m-col-t-4">
|
<div class="m-col-t-4">
|
||||||
<div class="m-row">
|
<div class="m-row">
|
||||||
|
|
Loading…
Reference in New Issue