- <!DOCTYPE html>
- <html xmlns:th="http://www.thymeleaf.org">
- <head>
- <meta charset="ISO-8859-1">
- <title>Welcome to Tas kLibrary</title>
- <link rel="stylesheet" type="text/css" href="/webjars/bootstrap/css/bootstrap.min.css">
- <script type="text/javascript" src="/webjars/jquery/jquery.min.js"></script>
- <script type="text/javascript" src="/webjars/bootstrap/js/bootstrap.min.js"></script>
- <script type="text/javascript">
- function borrowBook(userEmail, bookIds){
- let fetchRes = fetch(
- "https://localhost:8081/book?userEmail=email&bookIds=["abc","bbc"]");
- fetchRes.then(res =>
- userEmail=this.userEmail
- res.json()).then(d => {
- console.log(d)
- })
- }
- </script>
- <title>Books List</title>
- </head>
- </head>
- <body>
- <div class="container text-center">
- <div>
- <form th:action="@{/logout}" method="post">
- <p>
- Welcome <b>[[${#request.userPrincipal.principal.fullName}]]</b>
- </p>
- <input type="submit" value="Sign Out">
- </form>
- </div>
- <div class="btn-group">
- <form th:action="@{/all}" method="get">
- <input type="submit" value="All books">
- </form>
- <form th:action="@{/available}" method="get">
- <input type="submit" value="Available books">
- </form>
- <form th:action="@{/filter}" method="get">
- <input type="submit" value="Filter books">
- </form>
- </div>
- <div>
- <h1>Welcome to the books List</h1>
- </div>
- <div>
- <table class="table table-striped table-bordered">
- <thead class="thead-dark">
- <tr>
- <th>Book ID</th>
- <th>Title</th>
- <th>Author</th>
- <th>Genre</th>
- <th>Price</th>
- <th>Publish Date</th>
- <th>Description</th>
- <th>Borrowed</th>
- <th>Borrowed By</th>
- </tr>
- </thead>
- <tbody>
- <tr th:each="book: ${listBooks}">
- <td th:text="${book.getId}"> Book-ID </td>
- <td th:text="${book.getTitle}">Title </td>
- <td th:text="${book.author}">Author</td>
- <td th:text="${book.genre}">Genre</td>
- <td th:text="${book.price}">Price</td>
- <td th:text="${book.publish_date}">Publish-Date</td>
- <td th:text="${book.description}">Description</td>
- <td th:text="${book.borrowed}">Borrowed</td>
- <td th:text="${book.borrowedBy}">Borrowed-By</td>
- <td> <input type="checkbox"id="" name="requestedBooks"value=""></td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="btn-group">
- <button onclick="borrowBook(userEmail, bookIds)">Borrow</button>
- <button onclick="returnBook(userEmail, bookId)">Return</button>
- </div>
- </div>
- </body>
- </html>
[text] available_books.html
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Editor
You can edit this paste and save as new: