Changeset 3c7bf5b for Prototype Application/Paw5
- Timestamp:
- 02/16/23 15:21:12 (21 months ago)
- Branches:
- main
- Children:
- eac569a
- Parents:
- 9a180fd
- Location:
- Prototype Application/Paw5/src/main
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PostController.java
r9a180fd r3c7bf5b 88 88 request.getSession().setAttribute("pet", pet);//temp 89 89 90 if(pet.getAdoptionId() != null){ 91 request.getSession().setAttribute("disableAdoption", true); 92 } else{ 93 request.getSession().setAttribute("disableAdoption", false); 94 } 95 90 96 return "pet-details"; 91 97 } -
Prototype Application/Paw5/src/main/resources/templates/aboutUs.html
r9a180fd r3c7bf5b 40 40 <h5 class="text-center text-danger"> 41 41 You successfully logged in 42 <th:block th:text="${session.user .getId()}"></th:block>42 <th:block th:text="${session.user?.getId()}"></th:block> 43 43 </h5> 44 44 </div> -
Prototype Application/Paw5/src/main/resources/templates/home.html
r9a180fd r3c7bf5b 39 39 <h1>Welcome to Paw 5</h1> 40 40 <h3>Let's get started 41 <th:block th:text="${session.user .getName()}"></th:block>41 <th:block th:text="${session.user?.getName()}"></th:block> 42 42 </h3> 43 43 </div> 44 44 <div> 45 <form method="get" th:action="@{'/adoption-posts'}"> 46 <button id="submit" type="submit">View Adoption posts</button> 47 </form> 48 </div> 45 49 </body> 46 50 </html> -
Prototype Application/Paw5/src/main/resources/templates/list-posts-adoption.html
r9a180fd r3c7bf5b 7 7 <meta charset="UTF-8"> 8 8 <title>Adoption Posts</title> 9 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> 10 <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> 11 <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script> 12 <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> 13 9 14 </head> 10 15 <body> 16 <header> 17 <nav class="navbar navbar-expand-md navbar-dark bg-dark"> 18 <div class="container"> 19 <a class="navbar-brand" href="/home">Paw 5</a> 20 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" 21 aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation"> 22 <span class="navbar-toggler-icon"></span> 23 </button> 24 25 <div class="collapse navbar-collapse justify-content-end" id="navbarsExampleDefault"> 26 <ul class="navbar-nav m-auto"> 27 <li class="nav-item m-auto"> 28 <a class="nav-link active" href="/home/aboutUs">About us</a> 29 </li> 30 <li class="nav-item m-auto"> 31 <a class="nav-link active" href="/login">Login</a> 32 </li> 33 <li class="nav-item m-auto"> 34 <a class="nav-link active" href="/register">Register</a> 35 </li> 36 </ul> 37 </div> 38 </div> 39 </nav> 40 </header> 11 41 <table> 12 42 <tr> -
Prototype Application/Paw5/src/main/resources/templates/pet-details.html
r9a180fd r3c7bf5b 7 7 <meta charset="UTF-8"> 8 8 <title>Title</title> 9 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> 10 <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> 11 <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script> 12 <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> 9 13 </head> 10 14 <body> 15 <header> 16 <nav class="navbar navbar-expand-md navbar-dark bg-dark"> 17 <div class="container"> 18 <a class="navbar-brand" href="/home">Paw 5</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> 23 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="/home/aboutUs">About us</a> 28 </li> 29 <li class="nav-item m-auto"> 30 <a class="nav-link active" href="/login">Login</a> 31 </li> 32 <li class="nav-item m-auto"> 33 <a class="nav-link active" href="/register">Register</a> 34 </li> 35 </ul> 36 </div> 37 </div> 38 </nav> 39 </header> 11 40 <table> 12 41 <tr> … … 38 67 </tr> 39 68 </table> 40 <form method="POST" th:action="@{'/submit-adopton-{id}' (id=${session.pet.getId()})}" th:disabled="${session. pet.getAdoptionId()==null}">69 <form method="POST" th:action="@{'/submit-adopton-{id}' (id=${session.pet.getId()})}" th:disabled="${session.disableAdoption}"> 41 70 <button id="submit" type="submit">Adopt</button> 42 71 </form>
Note:
See TracChangeset
for help on using the changeset viewer.