<?= $this->extend("layouts/default") ?>
<?= $this->section("title") ?>Certifications<?= $this->endSection() ?>
<?= $this->section("content") ?>


<?= view(
    "layouts/bcr-nav",
    [
        "title" => "Certifications",
        "controller" => "Certifications",
        "links" => [
            "New" =>  ["url" => url_to("Certifications::new"), "auth_check" => true]
        ]
    ]
) ?>

<div class="index-div">


    <table>
        <tr>
            <th></th>
            <th>ID</th>
            <th>Certification</th>
            <th>Last Updated</th>
            <th>Updated By</th>

            <?php foreach ($certifications as $certification): ?>
        <tr>
            <td>
                <a href="<?= site_url('/certifications/' . $certification->CertificationID) ?>">
                    <button>View</button>
                </a>
            </td>
            <td>
                <?= $certification->CertificationID ?>
            </td>
            <td>
                <?= esc($certification->Certification) ?>
            </td>
            <td>
                <?= $certification->lastupdated ?>
            </td>
            <td>
                <?= esc($certification->username) ?>
            </td>
        </tr>
    <?php endforeach; ?>


    </table>
</div>
<?= $this->endSection() ?>