- Timestamp:
- 03/05/23 17:35:54 (16 months ago)
- Branches:
- main
- Children:
- 8b7dd7f
- Parents:
- 9358bff
- Location:
- Prototype Application/Paw5/src/main/resources/templates
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Prototype Application/Paw5/src/main/resources/templates/list-posts-adoption.html
r9358bff r5f53114 1 1 <!DOCTYPE html> 2 2 <html xmlns="http://www.w3.org/1999/xhtml" 3 xmlns:th="http:// www.thymeleaf.org"3 xmlns:th="http://thymeleaf.org" 4 4 xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3" 5 5 xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"> … … 45 45 <th>Species</th> 46 46 </tr> 47 <tr th:each = "post : ${ session.posts}">47 <tr th:each = "post : ${posts}"> 48 48 <td th:text = "${post.getId()}"></td> 49 <td th:each = "pet : ${ session.pets}" th:if="${post.getPetId()==pet.getId()}" th:text = "${pet.getName()}"></td>50 <td th:each = "pet : ${ session.pets}" th:if="${post.getPetId()==pet.getId()}" th:text = "${pet.getSpecies()}"></td>49 <td th:each = "pet : ${pets}" th:if="${post.getPetId()==pet.getId()}" th:text = "${pet.getName()}"></td> 50 <td th:each = "pet : ${pets}" th:if="${post.getPetId()==pet.getId()}" th:text = "${pet.getSpecies()}"></td> 51 51 <td> 52 52 <form th:action="@{'/pet-details-{id}' (id=${post.getId()})}" -
Prototype Application/Paw5/src/main/resources/templates/pet-details.html
r9358bff r5f53114 1 1 <!DOCTYPE html> 2 2 <html xmlns="http://www.w3.org/1999/xhtml" 3 xmlns:th="http:// www.thymeleaf.org"3 xmlns:th="http://thymeleaf.org" 4 4 xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3" 5 5 xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"> … … 41 41 <tr> 42 42 <th>Post ID</th> 43 <td th:text = "${ session.post.getId()}"></td>43 <td th:text = "${post.getId()}"></td> 44 44 <tr> 45 45 <th>Pet Name</th> 46 <td th:text = "${ session.pet.getName()}"></td>46 <td th:text = "${pet.getName()}"></td> 47 47 </tr> 48 48 <tr> 49 49 <th>Species</th> 50 <td th:text = "${ session.pet.getSpecies()}"></td>50 <td th:text = "${pet.getSpecies()}"></td> 51 51 </tr> 52 52 <tr> 53 53 <th>Breed</th> 54 <td th:text = "${ session.pet.getBreed()}"></td>54 <td th:text = "${pet.getBreed()}"></td> 55 55 </tr> 56 56 <tr> 57 57 <th>Gender</th> 58 <td th:text = "${ session.pet.getGender()}"></td>58 <td th:text = "${pet.getGender()}"></td> 59 59 </tr> 60 60 <tr> 61 61 <th>Age Group</th> 62 <td th:text = "${ session.pet.getAgeGroup}"></td>62 <td th:text = "${pet.getAgeGroup}"></td> 63 63 </tr> 64 64 <tr> 65 65 <th>Size</th> 66 <td th:text = "${ session.pet.getSize()}"></td>66 <td th:text = "${pet.getSize()}"></td> 67 67 </tr> 68 68 </table> 69 69 <form method="POST" 70 th:action="@{'/submit-adopton-{id}' (id=${session.pet.getId()})}" 71 th:if="${session.pet.getAdoptionId()==null}"> 72 <button id="submit" type="submit">Adopt</button> 70 th:action="@{'/submit-adopton-{id}' (id=${pet.getId()})}" 71 th:if="${pet.getAdoptionId()==null}"> 72 <button id="submit" 73 type="submit" 74 class="btn">Adopt</button> 73 75 </form> 74 76
Note:
See TracChangeset
for help on using the changeset viewer.