From 19653311493f2f89237a3811b305f52f9f6bc49e Mon Sep 17 00:00:00 2001 From: Julian Hinxlage Date: Thu, 6 Jun 2019 13:00:08 +0200 Subject: [PATCH] +landing page --- .../java/de/hsel/itech/jsf/CategoryBean.java | 10 +++++ src/main/webapp/cart.xhtml | 4 +- src/main/webapp/confirmation.xhtml | 10 +++-- src/main/webapp/index.html | 10 +++++ src/main/webapp/index.xhtml | 42 ++++++++++++++++++- src/main/webapp/login.xhtml | 11 +++-- 6 files changed, 77 insertions(+), 10 deletions(-) create mode 100644 src/main/webapp/index.html 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 ? - +