Changeset d14176d for src/main/resources/templates
- Timestamp:
- 07/07/23 12:14:58 (16 months ago)
- Branches:
- main
- Parents:
- 1dd9226
- Location:
- src/main/resources/templates
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/resources/templates/access_denied.html
r1dd9226 rd14176d 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>$Title$</title> 6 </head> 7 <body> 8 $END$ 9 </body> 10 </html> 1 <div class="container py-5"> 2 <div class="row"> 3 <div class="col-md-2 text-center"> 4 <p><i class="fa fa-exclamation-triangle fa-5x"></i><br/>Status Code: 403</p> 5 </div> 6 <div class="col-md-10"> 7 <p>Sorry, your access is refused.<br/>Please go back to the previous page to continue browsing.</p> 8 <a class="btn btn-danger" href="javascript:history.back()">Go Back</a> 9 </div> 10 </div> 11 </div> -
src/main/resources/templates/add_product.html
r1dd9226 rd14176d 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>$Title$</title> 6 </head> 7 <body> 8 $END$ 9 </body> 10 </html> 1 <th:block xmlns:th="http://www.thymeleaf.org"> 2 <section class="jumbotron text-center"> 3 <div class="container"> 4 <h1 class="jumbotron-heading">FMO</h1> 5 <h2 class="jumbotron-heading">Food Market Online</h2> 6 </div> 7 </section> 8 9 <div class="container"> 10 <div class="row"> 11 <div class="col-md-5"> 12 <form action="/products/add" method="POST"> 13 <input id="id" type="hidden" name="id" th:value="(${product} != null ? ${product.getIdProdukt()} : '')"> 14 <div class="form-group"> 15 <label for="name">Product name</label> 16 <input type="text" 17 class="form-control" 18 id="name" 19 name="name" 20 th:value="(${product} != null ? ${product.getIme()} : '')" 21 required 22 placeholder="Enter product name"> 23 </div> 24 <div class="form-group"> 25 <label for="price">Price</label> 26 <input type="text" 27 class="form-control" 28 id="price" 29 name="price" 30 required 31 th:value="(${price?.getIznos()} )" 32 placeholder="Price"> 33 </div> 34 <div class="form-group"> 35 <label for="Description">Description</label> 36 <input type="text" 37 class="form-control" 38 id="description" 39 name="description" 40 th:value="(${product} != null ? ${product.getOpis()} : '')" 41 placeholder="Description"> 42 </div> 43 <div class="form-group"> 44 <label>Category</label> 45 <select name="category" class="form-control"> 46 <option th:if="${chosen} != null" 47 th:selected="${chosen.getIdKategorija() != null && 48 chosen.getIdKategorija() == cat.getIdKategorija()}" 49 th:each="cat : ${categories}" 50 th:value="${cat.getIdKategorija()}" 51 th:text="${cat.getIme()}"> 52 </option> 53 <option th:if="${chosen} == null" 54 th:each="cat : ${categories}" 55 th:value="${cat.getIdKategorija()}" 56 th:text="${cat.getIme()}"> 57 </option> 58 </select> 59 </div> 60 <div class="form-group"> 61 <label>Date from</label> 62 <input type="date" 63 class="form-control" 64 id="date" 65 name="date" 66 th:value="${price?.getCenaOd()} ?: null" 67 required> 68 </div> 69 <div class="form-group"> 70 <label>Date to</label> 71 <input type="date" 72 class="form-control" 73 id="dateTo" 74 name="dateTo" 75 th:value="${price?.getCenaDo() }"> 76 </div> 77 78 <button id="submit" type="submit" class="btn btn-primary">Submit</button> 79 <a type="button" class="btn btn-primary" href="/products">Back</a> 80 </form> 81 </div> 82 </div> 83 </div> 84 85 86 </th:block> -
src/main/resources/templates/cart.html
r1dd9226 rd14176d 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>$Title$</title> 6 </head> 7 <body> 8 $END$ 9 </body> 10 </html> 1 <th:block xmlns:th="http://www.thymeleaf.org"> 2 <section class="jumbotron text-center"> 3 <div class="container"> 4 <h3 class="jumbotron-heading">Shopping cart for 5 <th:block th:if="${#request.getRemoteUser() != null}" th:text="${#request.getRemoteUser()}"></th:block> 6 </h3> 7 </div> 8 </section> 9 10 <div th:if="${hasError}"> 11 <h5 class="text-center text-danger" th:text="${error}"></h5> 12 </div> 13 14 <div class="container mb-4"> 15 <div class="row"> 16 <div class="col-12" th:if="${products.size() > 0}"> 17 <div class="table-responsive"> 18 <table class="table table-striped"> 19 <thead> 20 <tr> 21 <th scope="col">Product</th> 22 <th scope="col">Total Price for product</th> 23 <th scope="col">Quantity</th> 24 </tr> 25 </thead> 26 <tbody> 27 <span th:each="p:${po}"> 28 <tr th:each="product : ${products}" th:if="${product.getIdProdukt()} == ${p.getIdProdukt()}" class="cart-item"> 29 <td th:text="${product.getIme()}"></td> 30 <td th:text="${p.getCena()}">Cena</td> 31 <td th:text="${p.getKolicina()}"></td> 32 </tr> 33 </span> 34 </tbody> 35 </table> 36 37 <div> 38 <label>Total price </label> 39 <span th:text="${order.getVkupnoSuma()}"></span></div> 40 41 <form th:action="@{'/order/{id}/success' (id=${order.getIdNaracka()})}" th:method="POST"> 42 <label>Adresa za dostava</label> 43 <input type="text" name="address" id="address" placeholder="/"> 44 <button type="submit" 45 class="btn btn-sm btn-primary cart-product"> 46 <i class="fa fa-trash">Order</i> 47 </button> 48 </form> 49 </div> 50 </div> 51 </div> 52 </div> 53 </th:block> 54 -
src/main/resources/templates/delivery.html
r1dd9226 rd14176d 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>$Title$</title> 6 </head> 7 <body> 8 $END$ 9 </body> 10 </html> 1 <div th:if="${delivers.size() == 0}" 2 xmlns:sec="http://www.w3.org/1999/xhtml"> 3 <h1 style="text-align: center"> No orders to deliver!</h1> 4 </div> 5 6 <div class="container mb-4" > 7 <div class="row"> 8 <div class="col-12" th:if="${delivers.size() > 0}"> 9 <div class="table-responsive"> 10 <table class="table table-striped"> 11 <thead> 12 <tr> 13 <th scope="col">Order ID</th> 14 <th scope="col">Address</th> 15 <th scope="col">Total price</th> 16 <th scope="col">Date</th> 17 18 </tr> 19 </thead> 20 <tbody> 21 <tr th:each="delivery : ${delivers} " class="product"> 22 <td th:text="${delivery.getIdNaracka()}" ></td> 23 <td th:each="order : ${orders}" th:if="${order.getIdNaracka() == delivery.getIdNaracka()}" 24 th:text="${order.getAdresa()}"></td> 25 <td th:each="order : ${orders}" th:if="${order.getIdNaracka() == delivery.getIdNaracka()}" 26 th:text="${order.getVkupnoSuma()}"></td> 27 <td th:text="${delivery.getDatum()}" 28 ></td> 29 <td class="text-right"> 30 <form th:method="POST" th:action="@{'/delivery/{id}' (id=${delivery.getIdDostava()})}"> 31 <button type="submit" 32 class="btn btn-sm btn-primary cart-product" sec:authorize="hasRole('ROLE_DELIVER')"> 33 <i class="fa fa-trash">Order delivered</i> 34 </button> 35 </form> 36 </td> 37 </tr> 38 </tbody> 39 </table> 40 </div> 41 </div> 42 </div> 43 </div> -
src/main/resources/templates/home.html
r1dd9226 rd14176d 1 < !DOCTYPE html>2 <html lang="en">3 <head>4 <meta charset="UTF-8">5 <title>$Title$</title>6 </ head>7 <body> 8 $END$ 9 </body> 10 </html> 1 <section class="jumbotron text-center" xmlns:th="http://www.thymeleaf.org"> 2 <div class="container"> 3 <h1 class="jumbotron-heading">FMO</h1> 4 <h2 class="jumbotron-heading">Food Market Online</h2> 5 </div> 6 </section> 7 8 9 10 -
src/main/resources/templates/login.html
r1dd9226 rd14176d 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>$Title$</title> 6 </head> 7 <body> 8 $END$ 9 </body> 10 </html> 1 <div class="container" xmlns:th="http://www.thymeleaf.org"> 2 <form class="form-signin mt-xl-5" method="post" action="/login"> 3 <h2 class="form-signin-heading">Sign in</h2> 4 <p> 5 <label for="username" class="sr-only">Username</label> 6 <input type="text" id="username" name="username" class="form-control" placeholder="Username" required="" 7 autofocus=""> 8 </p> 9 <p> 10 <label for="password" class="sr-only">Password</label> 11 <input type="password" id="password" name="password" class="form-control" placeholder="Password" 12 required=""> 13 </p> 14 15 <div th:text="${param.error}" class="text-danger"></div> 16 17 <button id="submit" class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button> 18 </form> 19 </div> -
src/main/resources/templates/master_template.html
r1dd9226 rd14176d 1 1 <!DOCTYPE html> 2 <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"> 2 <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" 3 xmlns:sec="http://www.w3.org/1999/xhtml"> 3 4 <head> 4 5 <meta charset="UTF-8"> … … 12 13 <body> 13 14 14 <nav class="navbar navbar-inverse"> 15 <div class="container-fluid"> 15 <header xmlns:th="http://www.thymeleaf.org"> 16 <nav class="navbar navbar-expand-md navbar-dark bg-dark"> 17 <div class="container"> 18 <a class="navbar-brand" href="/">FMO</a> 19 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" 20 aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation"> 21 <span class="navbar-toggler-icon"></span> 22 </button> 16 23 17 <div class="collapse navbar-collapse" id="myNavbar"> 18 <ul class="nav navbar-nav"> 19 <li class="active"><a href="home.html">Home</a></li> 20 <li><a href="products.html">Products</a></li> 21 <li><a href="statistics.html">Statistics</a></li> 22 <li><a href="delivery.html">Delivery</a></li> 23 </ul> 24 <ul class="nav navbar-nav navbar-right"> 25 <li><a href="register.html"><span class="glyphicon glyphicon-user"></span>Register</a></li> 26 <li><a href="/login"><span class="glyphicon glyphicon-user"></span>Login</a></li> 27 <li><a href="cart.html"><span class="glyphicon glyphicon-shopping-cart"></span> Cart</a></li> 28 <li><a href="/logout"><span class="glyphicon glyphicon-user"></span>Log out</a></li> 29 </ul> 24 <div class="collapse navbar-collapse justify-content-end" id="navbarsExampleDefault"> 25 <ul class="navbar-nav m-auto"> 26 <li class="nav-item m-auto"> 27 <a class="nav-link active" href="/products">Products</a> 28 </li> 29 <li class="nav-item m-auto" sec:authorize="hasRole('ROLE_ADMIN')"> 30 <a class="nav-link active" th:href="@{/statistics}" th:method="GET">Statistics</a> 31 </li> 32 <li class="nav-item m-auto" sec:authorize="hasRole('ROLE_DELIVER')"> 33 <a class="nav-link active" th:href="@{/delivery}" th:method="GET">Delivery</a> 34 </li> 35 </ul> 36 37 38 <ul class="nav navbar-nav navbar-right"> 39 40 41 <li class="nav-item" sec:authorize="hasRole('ROLE_USER')"> 42 <a class="btn btn-success btn-sm ml-3" th:href="@{/order}" th:method="GET"> 43 <i class="fa fa-shopping-cart"></i> Cart 44 </a> 45 </li> 46 <li class="nav-item" sec:authorize="isAuthenticated()"> 47 <a class="btn btn-light btn-sm ml-3" href="/logout"> 48 <i class="fa fa-shopping-cart"></i> Logout 49 </a> 50 <li class="nav-item"> 51 <a class="btn btn-light btn-sm ml-3" sec:authorize="!isAuthenticated()" href="/register"> 52 <i class="fa fa-shopping-cart"></i> Register 53 </a> 54 </li> 55 <li class="nav-item" sec:authorize="!isAuthenticated()"> 56 <a class="btn btn-light btn-sm ml-3" href="/login"> 57 <i class="fa fa-shopping-cart"></i> Login 58 </a> 59 </li> 60 </ul> 61 </div> 30 62 </div> 31 </ div>32 </ nav>63 </nav> 64 </header> 33 65 34 66 35 67 36 <section th:include="${bodyContent}"> 68 <section th:include="${bodyContent}"></section> 37 69 38 70 39 71 40 72 41 <footer class="container-fluid text-center" >73 <footer class="container-fluid text-center" style="padding-top: 100px"> 42 74 <p>FMO Store</p> 43 75 <p>2023</p> -
src/main/resources/templates/not_valid_delete.html
r1dd9226 rd14176d 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>$Title$</title> 6 </head> 7 <body> 8 $END$ 9 </body> 10 </html> 1 <div> 2 <h2 style="text-align: center">Produktot se naogja vo edna ili povekje naracki i zatoa ne moze da bide izbrishen!</h2> 3 <a style="text-align: center; display: block" href="/products">Back to products</a> 4 5 </div> -
src/main/resources/templates/product_info.html
r1dd9226 rd14176d 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>$Title$</title> 6 </head> 7 <body> 8 $END$ 9 </body> 10 </html> 1 <div xmlns:th="http://www.thymeleaf.org" > 2 3 <form class="block" th:method="post" th:action="@{'/products/{id}/add-to-cart' (id = ${product.getIdProdukt()})}"> 4 <input type="hidden" name="idKorisnik" id="idKorisnik" th:value="${#request.getRemoteUser()}"> 5 <input type="hidden" name="cena" id="cena" th:value="${price.getIznos()}"> 6 <label style="margin: auto; text-align: center; display: block; padding-top: 20px">Product name</label> 7 <p style="margin: auto; text-align: center" id="name" name="name" th:value="${product.getIme()}" th:text="${product.getIme()}"></p> 8 <label style="margin: auto; text-align: center; display: block; padding-top: 20px">Product description</label> 9 <p style="margin: auto; text-align: center" name="description" id="description" th:value="${product.getOpis()}" th:text="${product.getOpis()}"></p> 10 <label style="margin: auto; text-align: center; display: block ; padding-top: 20px">price</label> 11 <p style="margin: auto; text-align: center" name="price" id="price" th:value="${price.getIznos()}" th:text="${price.getIznos()}"></p> 12 <label style="margin: auto; text-align: center; display: block; padding-top: 20px">Category</label> 13 <p style="margin: auto; text-align: center;" name="category" id="category" th:value="${kat.getIme()}" th:text="${kat.getIme()}"></p> 14 <label style="margin: auto; text-align: center; display: block; padding-top: 20px">Quantity</label> 15 <input type="number" name="quantity" id="quantity" style="margin: auto; text-align: center; display: block" required="required"> 16 17 18 <button style="margin: auto; text-align: center; display: block; padding-top: 20px" id="submit" type="submit" class="btn btn-primary">Submit</button> 19 <a style="margin: auto; text-align: center; display: block; padding-top: 20px; width: 75px" type="button" class="btn btn-primary" href="/products">Back</a> 20 21 </form> 22 23 24 </div> -
src/main/resources/templates/products.html
r1dd9226 rd14176d 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>$Title$</title> 6 </head> 7 <body> 8 $END$ 9 </body> 10 </html> 1 <div xmlns:th="http://www.thymeleaf.org" xmlns:sec=""> 2 <section class="jumbotron text-center"> 3 <div class="container"> 4 <h1 class="jumbotron-heading">Food Market Online</h1> 5 <h3 class="jumbotron-heading">All products</h3> 6 </div> 7 </section> 8 <!--//th:method="GET" th:action="@{/products}"--> 9 <div class="container mb-4" > 10 <div class="row"> 11 <div class="col-12" th:if="${products.size() > 0}"> 12 <div class="table-responsive"> 13 <table class="table table-striped"> 14 <thead> 15 <tr> 16 <th scope="col">Product name</th> 17 <th scope="col">Price</th> 18 <th scope="col">Category</th> 19 20 </tr> 21 </thead> 22 <tbody> 23 <tr th:each="product : ${products} " class="product"> 24 <td th:text="${product.getIme()}" ></td> 25 <td th:each="price: ${prices}" th:if="${price.getIdProdukt()} == ${product.getIdProdukt()}" 26 th:text="${price.getIznos()}">Cena</td> 27 <td th:each="category: ${categories}" th:if="${category.getIdProdukt()} == ${product.getIdProdukt()}" 28 ><span th:each="k:${kat}" th:if="${k.getIdKategorija()} == ${category.getIdKategorija()}" 29 th:text="${k.getIme()}"></span></td> 30 <td class="text-right"> 31 <th:block sec:authorize="hasRole('ROLE_ADMIN')"> 32 <form th:action="@{'/products/delete/{id}' (id=${product.getIdProdukt()})}" 33 th:method="DELETE"> 34 <button type="submit" 35 class="btn btn-sm btn-danger delete-product"> 36 <i class="fa fa-trash">Delete</i> 37 </button> 38 </form> 39 </th:block> 40 <th:block sec:authorize="hasRole('ROLE_ADMIN')"> 41 <a th:href="@{'/products/edit-form/{id}' (id=${product.getIdProdukt()})}" 42 class="btn btn-sm btn-info edit-product"> 43 <i class="fa fa-trash">Edit</i> 44 </a> 45 </th:block> 46 <form th:method="GET" th:action="@{'/products/{id}' (id=${product.getIdProdukt()})}"> 47 <button type="submit" 48 class="btn btn-sm btn-primary cart-product" sec:authorize="hasRole('ROLE_USER')"> 49 <i class="fa fa-trash">Add product to cart</i> 50 </button> 51 </form> 52 </td> 53 </tr> 54 </tbody> 55 </table> 56 </div> 57 </div> 58 <div class="col mb-3"> 59 <div class="row"> 60 <div class="col-sm-12 col-md-12" sec:authorize="hasRole('ROLE_ADMIN')"> 61 <a href="/products/add-form" class="btn btn-block btn-dark add-product-btn"> 62 Add new product 63 </a> 64 </div> 65 </div> 66 </div> 67 </div> 68 </div> 69 </div> -
src/main/resources/templates/register.html
r1dd9226 rd14176d 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>$Title$</title> 6 </head> 7 <body> 8 $END$ 9 </body> 10 </html> 1 <div class="container"> 2 <h1 th:if="${hasError}" th:text="${error}"></h1> 3 </div> 4 <div class="container"> 5 <form class="form-signin mt-xl-5" method="post" action="/register"> 6 <h2 class="form-signin-heading">Register</h2> 7 <p> 8 <label for="name_surname" class="sr-only">Name and Surname</label> 9 <input type="text" id="name_surname" name="name_surname" class="form-control" autocomplete="off" placeholder="name_surname" required="" 10 autofocus=""> 11 </p> 12 <p> 13 <label for="password" class="sr-only">Password</label> 14 <input type="password" id="password" name="password" class="form-control" placeholder="Password" autocomplete="off" 15 required=""> 16 </p> 17 <p> 18 <label for="repeatedPassword" class="sr-only">Repeat Password</label> 19 <input type="password" id="repeatedPassword" name="repeatedPassword" class="form-control" autocomplete="off" 20 placeholder="Repeat Password" required=""> 21 </p> 22 <p> 23 <label for="mail" class="sr-only">Mail</label> 24 <input type="text" id="mail" name="mail" class="form-control" placeholder="Mail" required="" autofocus="" autocomplete="off"> 25 </p> 26 <p> 27 <label for="number" class="sr-only">Telephone number</label> 28 <input type="text" id="number" name="number" class="form-control" placeholder="number" required="" autocomplete="off" 29 autofocus=""> 30 </p> 31 32 <button class="btn btn-lg btn-primary btn-block" type="submit">Register</button> 33 </form> 34 </div> 35 -
src/main/resources/templates/statistics.html
r1dd9226 rd14176d 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>$Title$</title> 6 </head> 7 <body> 8 $END$ 9 </body> 10 </html> 1 <th:block> 2 <h3 style="text-align: center;color: lightslategrey; margin: 50px">За секој корисник да се најде бројот на нарачки, да се прикаже просечна сума на сите нарачки за сите корисници, вкупна сума на нарачките на купувачот, колку негови нарачки се над глобалниот просек за сума на нарачка и колку е вкупната сума на неговите нарачки кои се над просекот</h3> 3 <div class="container mb-4" > 4 <div class="row"> 5 <div class="col-12"> 6 <div class="table-responsive"> 7 <table class="table table-striped"> 8 <thead> 9 <tr> 10 <th scope="col">ID</th> 11 <th scope="col">Ime</th> 12 <th scope="col">Vkupno naracki</th> 13 <th scope="col">Prosecna suma na naracka za site kupuvaci</th> 14 <th scope="col">Vkupna suma od site naracki na korisnikot</th> 15 <th scope="col">Vkupno naracki nad prosek na korisnikot</th> 16 <th scope="col">Vkupno suma na naracki nad prosek za korisnikot</th> 17 18 </tr> 19 </thead> 20 <tbody> 21 <tr th:each="user : ${users} " class="product"> 22 <td th:each="u : ${user}" th:text="${u} ?: '0' " ></td> 23 </tr> 24 </tbody> 25 </table> 26 </div> 27 </div> 28 </div> 29 </div> 30 31 <h3 style="text-align: center;color: lightslategrey; margin: 50px">За секој продукт наоѓаме во последните три месеци во колку нарачки е присутен, колкава е количината на продуктот во тие нарачки, просечна сума на нарачката во која е присутен продуктот, број на нарачки на продуктот кои корисникот сам ги подигнал, количина продадена на продуктот која корисникот сам ја подигнал, број на нарачки на продукот кои му биле доставени на корисникот и количина на продуктот која му била доставена на корисникот</h3> 32 <div class="container mb-4" > 33 <div class="row"> 34 <div class="col-12"> 35 <div class="table-responsive"> 36 <table class="table table-striped"> 37 <thead> 38 <tr> 39 <th scope="col">ID</th> 40 <th scope="col">Produkt ime</th> 41 <th scope="col">Broj na naracki vo koi e prisuten produktot</th> 42 <th scope="col">Kolicina prodadeno od produktot</th> 43 <th scope="col">Prosecna suma na naracka vo koja se sodrzi produktot</th> 44 <th scope="col">Broj na naracki na produktot koi korisnikot sam ke gi podigne</th> 45 <th scope="col">Kolicina prodadena na produktot bez dostava</th> 46 <th scope="col">Broj na naracki na produktot koi ke bidat dostaveni na korisnikot</th> 47 <th scope="col">Kolicina prodadena na produktot preku dostava</th> 48 </tr> 49 </thead> 50 <tbody> 51 <tr th:each="product : ${products} " class="product"> 52 <td th:each="p : ${product}" th:text="${p} ?: '0' " ></td> 53 </tr> 54 </tbody> 55 </table> 56 </div> 57 </div> 58 </div> 59 </div> 60 61 62 63 </th:block>
Note:
See TracChangeset
for help on using the changeset viewer.