        <div class="content-wrapper">
            <section class="content-header">
                <h1>
                    Pages
                    <small>Manajemen Halaman Website</small>
                </h1>
            </section>

            <section class="content">
                <a href="<?php echo base_url().'dashboard/tambah_halaman'; ?>" class="btn btn-sm btn-primary">
                    <i class="fa fa-plus"></i> Buat Halaman Baru
                </a>
                <br/><br/>

                <!-- Flash Messages -->
                <?php if ($this->session->flashdata('success')): ?>
                    <div class="alert alert-success alert-dismissible">
                        <button type="button" class="close" data-dismiss="alert">&times;</button>
                        <?= $this->session->flashdata('success'); ?>
                    </div>
                <?php endif; ?>

                <?php if ($this->session->flashdata('error')): ?>
                    <div class="alert alert-danger alert-dismissible">
                        <button type="button" class="close" data-dismiss="alert">&times;</button>
                        <?= $this->session->flashdata('error'); ?>
                    </div>
                <?php endif; ?>

                <div class="box box-primary">
                    <div class="box-header">
                        <h3 class="box-title">Halaman</h3>
                    </div>
                    <div class="box-body">
                        <table id="table45" class="table table-striped table-bordered nowrap" style="width:100%">
                            <thead>
                                <tr>
                                    <th width="1%">NO</th>
                                    <th>Judul Halaman</th>
                                    <th>URL Slug</th>
                                    <th width="15%">OPSI</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php 
                                $no = 1;
                                foreach($halaman as $h){ 
                                ?>
                                    <tr>
                                        <td><?php echo $no++; ?></td>
                                        <td><?php echo $h->halaman_judul; ?></td>
                                        <td><?php echo base_url()."halaman/".$h->halaman_slug; ?></td>
                                        <td>
                                            <a target="_blank" href="<?php echo base_url()."halaman/".$h->halaman_slug; ?>" class="btn btn-success btn-sm"> 
                                                <i class="fa fa-eye"></i>
                                            </a>
                                            <a href="<?php echo base_url().'dashboard/halaman_edit/'.$h->halaman_id; ?>" class="btn btn-warning btn-sm"> 
                                                <i class="fa fa-pencil"></i>
                                            </a>
                                            <a href="<?php echo base_url().'dashboard/halaman_hapus/'.$h->halaman_id; ?>" class="btn btn-danger btn-sm" onclick="return confirm('Hapus halaman ini?');"> 
                                                <i class="fa fa-trash"></i>
                                            </a>
                                        </td>
                                    </tr>
                                <?php } ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </section>
        </div>