<?= $this->extend('templates/index'); ?>
<?= $this->section('content'); ?>

<section class="content">
    <div class="container-fluid">
        <div class="row">
            <div class="col">
                <div class="card">
                    <div class="card-header">
                        <a class="btn btn-primary" href="<?= base_url('perusahaan/tambah_data/profil'); ?>">Tambah Data</a>
                    </div>
                <!-- /.card-header -->
                    <div class="card-body">
                        <table class="table table-bordered">
                            <thead>
                                <tr class="text-center">
                                    <th style="width: 10px">No.</th>
                                    <th>Aksi</th>
                                    <th>Nama Perusahaan</th>
                                    <th>Keterangan</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php foreach($data as $key => $r) : ?>
                                <tr>
                                    <td class="text-center">1.</td>
                                    <td class="text-center">
                                    <?php
                                        $label = ['Edit', 'Detail', 'Hapus'];
                                        $label_url = [
                                            "perusahaan/edit/profil/".$r['id'], 
                                            "perusahaan/detail/profil/".$r['id'], 
                                            "perusahaan/delete/profil/".$r['id']
                                        ];
                                    ?>
                                    <?= aksi_button($label, $label_url); ?>
                                    </td>
                                    <td>
                                        <?= $r['nama']; ?>
                                    </td>
                                    <td><?= $r['keterangan']; ?></td>
                                </tr>
                                <?php endforeach; ?>
                            </tbody>
                        </table>
                    </div>
                <!-- /.card-body -->
                <div class="card-footer clearfix">
                    <ul class="pagination pagination-sm m-0 float-right">
                    <li class="page-item"><a class="page-link" href="#">&laquo;</a></li>
                    <li class="page-item"><a class="page-link" href="#">1</a></li>
                    <li class="page-item"><a class="page-link" href="#">2</a></li>
                    <li class="page-item"><a class="page-link" href="#">3</a></li>
                    <li class="page-item"><a class="page-link" href="#">&raquo;</a></li>
                    </ul>
                </div>
                </div>
            </div>
        </div>
    </div>
</section>

<?= $this->endSection(); ?>