thymleaf java5

PHOTO EMBED

Wed Jun 21 2023 01:22:03 GMT+0000 (Coordinated Universal Time)

Saved by @rittam #html #java

<div class="form-group">
    <label>Ngày Lập: </label>
    <input type="date" class="form-control" th:field="*{ngayLap}" />
    <!-- get field in object -->
    <div th:if="${#fields.hasErrors('ngayLap')}" class="errors text-danger form-text" th:errors="*{ngayLap}"></div>
    <!-- validate form  -->
    <!-- table  -->

    <tr th:each="hoadon : ${list}">
        <td th:text="${hoadon.id}"></td>
        <td th:text="${hoadon.trangThai}"></td>
        <td>
            <a th:href="@{/hoadon/detail(id=${hoadon.id})}" class="btn btn-success ">detail</a>
            <a th:href="@{/hoadon/delete(id=${hoadon.id})}" class="btn btn-danger">Delete</a>
            <a th:href="@{/hoadon/update(id=${hoadon.id})}" class="btn btn-warning">Update</a>
        </td>
    </tr>
    <!-- table  -->
    <!-- combooboxx -->
    <div class="form-group">
        <label for="sanPham">Sản Phẩm:</label>
        <select class="form-control" th:field="*{sanPham}">
            <option value="">Chọn SanPham</option>
            <option th:each="sp : ${sanPhams}" th:value="${{sp}}" th:text="${sp.ten}">
            </option>
        </select>
        <div th:if="${#fields.hasErrors('sanPham')}" class="errors text-danger form-text" th:errors="*{sanPham}"></div>
    </div>
    <!-- combooboxx -->
    <!-- form  -->
    <form enctype="multipart/form-data" th:action="@{/manager/chitietsanpham/store}" th:object="${chitietsanpham}"
        method="post" class="form">
    </form>
    <!-- form -->
</div>




<!-- paniagation -->
              <nav aria-label="Page navigation example">
        <ul class="pagination justify-content-center">
            <li class="page-item">
                <a class="page-link" th:href="@{/khachhang/pre}">Previous</a>
            </li>
            <li th:each="index : ${panigation}" class="page-item"><a class="page-link"
                    th:href="@{/khachhang/pageno(pageno=${index})}" th:text="${index+1}"></a></li>
            <li class="page-item">
                <a class="page-link" th:href="@{/khachhang/next}">Next</a>
            </li>
        </ul>
    </nav>
content_copyCOPY