<!DOCTYPE html>

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

<body>

  <h2>Pediatricians</h2>

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

</body>
</html>
