<div class="context-main-bg context-main p-3">
    <legend class="text-center">Blog Posts</legend>
    <hr>
    {ADMIN_BREADCRUMBS}
    <form action="{ROOT_URL}admin/blog/delete" method="post">
        <table class="table table-striped">
            <thead>
                <tr>
                    <th style="width: 30%">Title</th>
                    <th style="width: 20%">Author</th>
                    <th style="width: 10%">comments</th>
                    <th style="width: 10%">Created</th>
                    <th style="width: 10%">Updated</th>
                    <th style="width: 5%"></th>
                    <th style="width: 5%"></th>
                    <th style="width: 10%">
                        <input type="checkbox" onchange="checkAll(this)" name="check.b" value="B_[]">
                    </th>
                </tr>
            </thead>
            <tbody>
                {LOOP}
                <tr>
                    <td><a href="{ROOT_URL}admin/blog/view/{ID}">{title}</a>{isDraft}</td>
                    <td>{authorName}</td>
                    <td>{commentCount}</td>
                    <td>{DTC}{created}{/DTC}</td>
                    <td>{DTC}{edited}{/DTC}</td>
                    <td><a href="{ROOT_URL}admin/blog/edit/{ID}" class="btn btn-sm btn-warning"><i class="fa fa-fw fa-pencil"></i></a></td>
                    <td><a href="{ROOT_URL}admin/blog/delete/{ID}" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></a></td>
                    <td>
                        <input type="checkbox" value="{ID}" name="B_[]">
                    </td>
                </tr>
                {/LOOP}
                {ALT}
                <tr>
                    <td colspan="7">
                        No results to show.
                    </td>
                </tr>
                {/ALT}
            </tbody>
        </table>
        <a href="{ROOT_URL}admin/blog/create" class="btn btn-sm btn-primary">Create</a>
        <button name="submit" value="submit" type="submit" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></button>
    </form>
</div>