<?php
/*
 * *************************************************
 * Copyright (C) 2021 Earworks.                    *
 * Codeigniter Project Template Modification       *
 * Please contact our email for more information : *
 * contact@earworks.co.id                          *
 * *************************************************
 */

defined('BASEPATH') OR exit('No direct script access allowed');
?>
<table class="table table-borderless sort">
    <?php if ($model->count() > 0) : ?>
        <?php foreach ($model as $res) : ?>
            <tr>
                <td><?= $res->nama ?></td>
                <td style="width:50px;">
                    <div class="mt-checkbox-inline">
                        <label class="mt-checkbox mt-checkbox-outline">
                            <input type="checkbox" name="syarat_absen" value="<?= $res->slug ?>" />
                            <span></span>
                        </label>
                    </div>
                </td>
            </tr>
        <?php endforeach; ?>
            <tr>
                <td colspan="2">
                    <a href="javascript:void(0)" onclick="page_script.generate_syarat(<?= $id ?>)" class="btn btn-primary btn-block">
                        <i class="fa fa-plus"></i>
                        Submit
                    </a>
                </td>
            </tr>
    <?php else : ?>
        <tr>
            <td class="text-center">Data tidak tersedia</td>
        </tr>
    <?php endif; ?>
</table>