2016-11-10 16:51:14 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
2019-03-20 22:15:09 -05:00
|
|
|
<html xmlns:th="https://www.thymeleaf.org"
|
2016-11-10 16:51:14 +00:00
|
|
|
th:replace="~{fragments/layout :: layout (~{::body},'owners')}">
|
|
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
|
2025-04-30 21:57:06 -04:00
|
|
|
<h2 th:text="#{ownerInformation}">Owner Information</h2>
|
2023-10-24 10:36:12 +05:30
|
|
|
|
|
|
|
|
<div th:if="${message}" class="alert alert-success" id="success-message">
|
|
|
|
|
<span th:text="${message}"></span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div th:if="${error}" class="alert alert-danger" id="error-message">
|
|
|
|
|
<span th:text="${error}"></span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-10 16:51:14 +00:00
|
|
|
<table class="table table-striped" th:object="${owner}">
|
|
|
|
|
<tr>
|
2025-04-30 21:57:06 -04:00
|
|
|
<th th:text="#{name}">Name</th>
|
2016-11-10 16:51:14 +00:00
|
|
|
<td><b th:text="*{firstName + ' ' + lastName}"></b></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2025-04-30 21:57:06 -04:00
|
|
|
<th th:text="#{address}">Address</th>
|
2020-04-19 21:56:57 +09:00
|
|
|
<td th:text="*{address}"></td>
|
2016-11-10 16:51:14 +00:00
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2025-04-30 21:57:06 -04:00
|
|
|
<th th:text="#{city}">City</th>
|
2020-04-19 21:56:57 +09:00
|
|
|
<td th:text="*{city}"></td>
|
2016-11-10 16:51:14 +00:00
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2025-04-30 21:57:06 -04:00
|
|
|
<th th:text="#{telephone}">Telephone</th>
|
2020-04-19 21:56:57 +09:00
|
|
|
<td th:text="*{telephone}"></td>
|
2016-11-10 16:51:14 +00:00
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
|
2025-04-30 21:57:06 -04:00
|
|
|
<a th:href="@{__${owner.id}__/edit}" class="btn btn-primary" th:text="#{editOwner}">Edit
|
2016-11-10 16:51:14 +00:00
|
|
|
Owner</a>
|
2025-04-30 21:57:06 -04:00
|
|
|
<a th:href="@{__${owner.id}__/pets/new}" class="btn btn-primary" th:text="#{addNewPet}">Add
|
2016-11-10 16:51:14 +00:00
|
|
|
New Pet</a>
|
|
|
|
|
|
|
|
|
|
<br />
|
|
|
|
|
<br />
|
|
|
|
|
<br />
|
2025-04-30 21:57:06 -04:00
|
|
|
<h2 th:text="#{petsAndVisits}">Pets and Visits</h2>
|
2016-11-10 16:51:14 +00:00
|
|
|
|
|
|
|
|
<table class="table table-striped">
|
|
|
|
|
|
|
|
|
|
<tr th:each="pet : ${owner.pets}">
|
|
|
|
|
<td valign="top">
|
|
|
|
|
<dl class="dl-horizontal">
|
2025-04-30 21:57:06 -04:00
|
|
|
<dt th:text="#{name}">Name</dt>
|
2020-04-19 21:56:57 +09:00
|
|
|
<dd th:text="${pet.name}"></dd>
|
2025-04-30 21:57:06 -04:00
|
|
|
<dt th:text="#{birthDate}">Birth Date</dt>
|
2016-11-10 16:51:14 +00:00
|
|
|
<dd
|
2020-04-19 21:56:57 +09:00
|
|
|
th:text="${#temporals.format(pet.birthDate, 'yyyy-MM-dd')}"></dd>
|
2025-04-30 21:57:06 -04:00
|
|
|
<dt th:text="#{type}">Type</dt>
|
2020-04-19 21:56:57 +09:00
|
|
|
<dd th:text="${pet.type}"></dd>
|
2016-11-10 16:51:14 +00:00
|
|
|
</dl>
|
|
|
|
|
</td>
|
|
|
|
|
<td valign="top">
|
|
|
|
|
<table class="table-condensed">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
2025-04-30 21:57:06 -04:00
|
|
|
<th th:text="#{visitDate}">Visit Date</th>
|
|
|
|
|
<th th:text="#{description}">Description</th>
|
2016-11-10 16:51:14 +00:00
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tr th:each="visit : ${pet.visits}">
|
2018-06-27 18:34:37 +02:00
|
|
|
<td th:text="${#temporals.format(visit.date, 'yyyy-MM-dd')}"></td>
|
2016-11-10 16:51:14 +00:00
|
|
|
<td th:text="${visit?.description}"></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2025-04-30 21:57:06 -04:00
|
|
|
<td><a th:href="@{__${owner.id}__/pets/__${pet.id}__/edit}" th:text="#{editPet}">Edit Pet</a></td>
|
|
|
|
|
<td><a th:href="@{__${owner.id}__/pets/__${pet.id}__/visits/new}" th:text="#{addVisit}">Add Visit</a></td>
|
2016-11-10 16:51:14 +00:00
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
</table>
|
2023-10-24 10:36:12 +05:30
|
|
|
<script>
|
|
|
|
|
// Function to hide the success and error messages after 3 seconds
|
|
|
|
|
function hideMessages() {
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
document.getElementById("success-message").style.display = "none";
|
|
|
|
|
document.getElementById("error-message").style.display = "none";
|
|
|
|
|
}, 3000); // 3000 milliseconds (3 seconds)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Call the function to hide messages
|
|
|
|
|
hideMessages();
|
|
|
|
|
</script>
|
|
|
|
|
|
2016-11-10 16:51:14 +00:00
|
|
|
</body>
|
|
|
|
|
|
2023-10-24 10:36:12 +05:30
|
|
|
|
2018-06-27 18:34:37 +02:00
|
|
|
</html>
|