products.ejs 1013 Bytes
<% include ../includes/header.ejs %>
    <table class="table table-bordered table-hover">
        <tr>
            <th width="100px" style="text-align: center;">카테고리명</th>
            <th style="text-align: center;">영상 개수</th>
            <th>내용</th>
            <th>삭제</th>
        </tr>
        <%products.forEach(function(product){%>
        <tr>
            <td>
                <a href="/admin/products/detail/<%=product.id%>"><%=product.name%></a>
            </td>
            <td>
                <%=product.getDate.year%> -
                <%=product.getDate.month%> -
                <%=product.getDate.day%>
            </td>
            <td>
                <a href="/admin/products/delete/<%=product.id%>" class="btn btn-danger" onclick="return confirm('삭제하시겠습니까?')">삭제</a>
            </td>
        </tr>
        <% }); %>
    </table>
 
    <a href="/admin/products/write" class="btn btn-default">작성하기</a>
 
<% include ../includes/footer.ejs %>