Skip to content

Commit

Permalink
added lists view for vets. closes # 74
Browse files Browse the repository at this point in the history
  • Loading branch information
springframeworkguru committed Nov 21, 2018
1 parent c8ce750 commit 2280ddd
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions pet-clinic-web/src/main/resources/templates/vets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
</head>
<body>
<!--/*@thymesVar id="vet" type="guru.springframework.sfgpetclinic.model.Vet"*/-->
<h2 th:text="'List of Vets'">List of Vets...</h2>
<h2>Veterinarians</h2>

<table class="table table-striped">
<thead>
<tr>
<th>Id</th>
<th>First Name</th>
<th>Last Name</th>
</tr>
</thead>
<tbody>
<tr th:each="vet : ${vets}">
<td th:text="${vet.id}">1</td>
<td th:text="${vet.firstName}">Joe</td>
<td th:text="${vet.lastName}">Buck</td>
</tr>
</tbody>
</table>
<table id="vets" class="table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Specialties</th>
</tr>
</thead>
<tbody>
<tr th:each="vet : ${vets}">
<td th:text="${vet.firstName + ' ' + vet.lastName}"></td>
<td><span th:each="specialty : ${vet.specialities}"
th:text="${specialty.description + ' '}" /> <span
th:if="${vet?.specialities?.size() == 0}">none</span></td>
</tr>
</tbody>
</table>
</body>
</html>

0 comments on commit 2280ddd

Please sign in to comment.