<!-- **********************************************************************************************************************************************************
    MAIN CONTENT
    *********************************************************************************************************************************************************** -->
<!--main content start-->
<section id="main-content">
    <section class="wrapper">
        <div class="row mt">
            <div class="col-lg-12">
                <div class="content-panel">
                    <h4 class="pull-left"><i class="fa fa-angle-right"></i> Data Menu</h4>
                    <div class="pull-right" style="padding-right: 10px;">
                        <a href="<?= base_url() ?>admin/menu/tambah_data">
                            <button type="button" class="btn btn-primary btn-xs">Insert Data</button>
                        </a>
                        <a href="<?= base_url() ?>admin/menu/changeorder">
                            <button type="button" class="btn btn-info btn-xs">Change Order</button>
                        </a>
                    </div>
                    <section id="unseen">
                        <table id="example" class="table table-bordered table-striped">
                            <thead>
                                <tr>
                                    <th>Menu Name</th>
                                    <th>No Urut</th>
                                    <th style="width: 10%">Active</th>
                                    <th style="width: 10%">&nbsp;</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php
                                foreach ($data_mainMenu->result() as $menu) {
                                    ?>
                                    <tr>
                                        <td><?= $menu->menu_name ?></td>
                                        <td class="numeric"><?= $menu->order ?></td>
                                        <td><?= $menu->active ?></td>
                                        <td>
                                            <div class="btn-group">
                                                <button type="button" class="btn btn-theme dropdown-toggle" data-toggle="dropdown">
                                                    Action <span class="caret"></span>
                                                </button>
                                                <ul class="dropdown-menu" role="menu">
                                                    <li><a href="<?= base_url() ?>admin/menu/editData/<?= $menu->id_menu ?>">Edit Data</a></li>
                                                    <li>
                                                        <?php
                                                        if ($menu->active == "Yes") {
                                                            ?>
                                                            <a href="<?= base_url() ?>admin/menu/changeNonActive/<?= $menu->id_menu ?>">Change NonActive</a>
                                                            <?php
                                                        } else {
                                                            ?>
                                                            <a href="<?= base_url() ?>admin/menu/changeActive/<?= $menu->id_menu ?>">Change Active</a>
                                                            <?php
                                                        }
                                                        ?>
                                                    </li>
                                                    <li><a href="<?= base_url() ?>admin/menu/deleteData/<?= $menu->id_menu ?>"  onclick="return confirm('Yakin Menghapus?')">Delete</a></li>
                                                </ul>
                                            </div>
                                        </td>
                                    </tr>
                                    <?php
                                }
                                ?>
                            </tbody>
                        </table>
                    </section>
                    <div style="clear: both"></div>
                </div>
            </div>
        </div><!--row -->
    </section>
</section>
