<!-- **********************************************************************************************************************************************************
    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><i class="fa fa-angle-right"></i> Data Article</h4>
                    <a style="margin-left: 15px;" href="<?= base_url()?>admin/article/add_article" class="btn btn-info">
                        Add Article
                    </a>
                    <section id="unseen">
                        <table id="example" class="table table-bordered table-striped">
                            <thead>
                                <tr>
                                    <th>Title</th>
                                    <th>Content</th>
                                    <th style="width: 10%">&nbsp;</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php
                                if ($data_page->num_rows() == 0) {
                                    echo "<tr><td colspan='3'>Data Belum Ada</td></tr>";
                                } else {
                                    foreach ($data_page->result() as $page) {
                                        ?>
                                        <tr>
                                            <td><?= $page->title ?></td>
                                            <td><?= substr(strip_tags($page->content), 0, 150) ?>...</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/article/edit_data/<?= $page->id ?>">Edit Data</a></li>
                                                        <li><a onclick="return confirm('apakah anda yakin??')" href="<?= base_url() ?>admin/article/delete_data/<?= $page->id ?>">Delete Data</a></li>
                                                    </ul>
                                                </div>
                                            </td>
                                        </tr>
                                        <?php
                                    }
                                }
                                ?>
                            </tbody>
                        </table>
                    </section>
                    <div style="clear: both"></div>
                </div>
            </div>
        </div><!--row -->
    </section>
</section>
