-
Notifications
You must be signed in to change notification settings - Fork 6
/
showBooks.html
70 lines (56 loc) · 2.09 KB
/
showBooks.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<body>
<div class="w3-container">
<div class="w3-container w3-sand">
<h1>Spring Boot Books Example .....</h1>
<h5>table of books from @Controller @Service @Repository and H2 DB</h5>
</div>
<Br>
<p >Aeat Link</p>
<p th:text ="${aeatName}">Aeat Link</p>
<p >Aeat</p>
<p th:text ="${aeat}">Aeat</p>
<p >Never</p>
<p th:text ="${changeInLove}">Never</p>
<div >
<p><a th:href="@{/library/javafaker(qtyBooks=100)}" class="w3-button w3-cyan">Create fake books on H2 -100-</a></p>
</div>
<div >
<p><a th:href="@{/library/javafaker}" class="w3-button w3-blue">Create fake books on H2 -500-</a></p>
</div>
<table class="w3-table-all w3-hoverable" >
<tr>
<td>BookId</td>
<td>Title</td>
<td>ISBN</td>
<td>Pages</td>
<td>Published Year</td>
<td>Author</td>
<td>Delete</td>
<td>Update</td>
<td>Detail</td>
</tr>
<tr th:each="book:${booksfromController}">
<td th:text="${book.bookId}"></td>
<td th:text="${book.title}"></td>
<td th:text="${book.isbn}"></td>
<td th:text="${book.pages}"></td>
<td th:text="${book.publishedYear}"></td>
<td th:text="${book.author}"></td>
<td> <a th:href ="@{deleteBook(bookIdFromView=${book.bookId})}"
class="w3-button w3-red">Delete this book</a> </td>
<td> <a th:href ="@{updateBook(bookIdFromView=${book.bookId})}"
class="w3-button w3-cyan">Update this book</a> </td>
<td> <a th:href ="@{detailBook(bookIdFromView=${book.bookId})}"
class="w3-button w3-black">Detail book</a> </td>
</tr>
</table>
<p>
<a th:href="@{/library/newBook}" class="w3-button w3-blue">Add new book</a>
</p>
</div>
</body>
</html>