<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org"
  th:replace="~{fragments/layout :: layout (~{::body},'vets')}">

<body>

  <h2>Veterinarians</h2>

  <table id="vets" class="table table-striped">
    <thead>
      <tr>
        <th>Name</th>
        <th>Specialties</th>
      </tr>
    </thead>
    <tbody>
      <tr th:each="vet : ${vets.vetList}">
        <td th:text="${vet.firstName + ' ' + vet.lastName}"></td>
        <td><span th:each="specialty : ${vet.specialties}"
          th:text="${specialty.name + ' '}" /> <span
          th:if="${vet.nrOfSpecialties == 0}">none</span></td>
      </tr>
    </tbody>
  </table>
</body>
</html>