diff --git a/src/main/java/de/hsel/itech/jsf/CategoryBean.java b/src/main/java/de/hsel/itech/jsf/CategoryBean.java index 7a5d15b..ed6869e 100644 --- a/src/main/java/de/hsel/itech/jsf/CategoryBean.java +++ b/src/main/java/de/hsel/itech/jsf/CategoryBean.java @@ -9,6 +9,7 @@ import lombok.Setter; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; @ManagedBean @@ -39,4 +40,13 @@ public class CategoryBean implements Serializable { public List getBooks() { return Database.getInstance().book().getAll(category); } + + public List getPresentedBooks() { + List books = Database.getInstance().book().getAll(); + if(books == null){ + return new ArrayList<>(); + }else{ + return books.subList( Math.max(0,books.size() - 3), books.size()); + } + } } \ No newline at end of file diff --git a/src/main/webapp/cart.xhtml b/src/main/webapp/cart.xhtml index b8ba9a8..64e4aaf 100644 --- a/src/main/webapp/cart.xhtml +++ b/src/main/webapp/cart.xhtml @@ -9,7 +9,7 @@
-

Warenkorb

+

Warenkorb

@@ -62,7 +62,7 @@ -

Der Warenkorb ist Leer

+

Bitte melden Sie sich an um Bücher in ihrem Warenkorb hinzuzufügen.

diff --git a/src/main/webapp/confirmation.xhtml b/src/main/webapp/confirmation.xhtml index 9cd7495..945ebba 100644 --- a/src/main/webapp/confirmation.xhtml +++ b/src/main/webapp/confirmation.xhtml @@ -9,7 +9,7 @@
-

Bestellbestätigung

+

Bestellbestätigung

@@ -22,8 +22,10 @@

#{paymentBean.selected.type.name}

- Inhaber: #{paymentBean.selected.owner}
+ Inhaber: #{paymentBean.selected.owner} +
Nummer : #{paymentBean.selected.number} / #{paymentBean.selected.checksum} +
gültig bis: #{paymentBean.selected.expiration}
@@ -38,10 +40,10 @@
- Buchcover + Buchcover
-

#{item.article.title}

+

#{item.article.title} - #{item.article.authorsString}

#{item.count} x #{item.article.priceString}€

diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html new file mode 100644 index 0000000..a30a65b --- /dev/null +++ b/src/main/webapp/index.html @@ -0,0 +1,10 @@ + + + + + Redirect + + + + + \ No newline at end of file diff --git a/src/main/webapp/index.xhtml b/src/main/webapp/index.xhtml index 81186d3..cca2bf7 100644 --- a/src/main/webapp/index.xhtml +++ b/src/main/webapp/index.xhtml @@ -10,7 +10,47 @@ - Hallo Welt!!! +
+
+

Amazon light

+
+
+

Sie haben noch nie ein richtig gutes Buch gelesen ?

+
+
+

Dann können wir auch nicht helfen

+
+
+ +
+
+ +
+
+

Aktuelle Angebote

+
+ +
+ + + +
+ Buchcover +
#{book.title}
+
+
+
+
+
+
+
+
diff --git a/src/main/webapp/login.xhtml b/src/main/webapp/login.xhtml index 2b5c9a4..f240de0 100644 --- a/src/main/webapp/login.xhtml +++ b/src/main/webapp/login.xhtml @@ -17,7 +17,7 @@
-
+
Nutzername
@@ -28,8 +28,13 @@
- Noch kein Account ? - +