<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<th:block th:each="board:${boardList}">
  <div class="col-12 py-2">
    <h5><i class="bi bi-dot"></i><span th:text="${board.searchCategoryName}"></span></h5>
    <table class="table table-striped text-center">
      <thead>
      <tr>
        <th></th>
        <th>제목</th>
        <th>파일 수</th>
        <th>작성자</th>
        <th>작성일</th>
        <th>조회수</th>
      </tr>
      </thead>
      <tbody>
      <th:block th:if="${board.contentList.size()==0}">
        <tr>
          <td colspan="6">검색 결과가 없습니다.</td>
        </tr>
      </th:block>
      <th:block th:unless="${board.contentList.size()==0}">
        <tr class="contentTr" th:each="content:${board.contentList}">
          <td>
            <input type="checkbox" class="contentCheckBox" th:value="${content.contentSeq}">
          </td>
          <td th:text="${content.title}"></td>
          <td th:text="${content.fileCnt}"></td>
          <td th:text="${content.createName}"></td>
          <th:block th:if="${#dates.format(#dates.createNow(), 'yyyy-MM-dd')} == ${#temporals.format(content.createDate, 'yyyy-MM-dd')}">
            <td th:text="${#temporals.format(content.createDate, 'HH:mm:ss')}"></td>
          </th:block>
          <th:block th:if="${#dates.format(#dates.createNow(), 'yyyy-MM-dd')} != ${#temporals.format(content.createDate, 'yyyy-MM-dd')}">
            <td th:text="${#temporals.format(content.createDate, 'yyyy-MM-dd')}"></td>
          </th:block>
          <td class="viewCntTd" th:text="${content.viewCnt}"></td>
        </tr>
      </th:block>
      </tbody>
    </table>
  </div>
</th:block>
</html>