<h3 class="text-left">權限管理</h3>

<?php if ($permissions['add']) { ?>
<ul class="table-toolbar" style="text-align: left;">
    
    <li>
        <a class="toolbar-element btn btn-default btn-create" href="/permission/add">
            <i class="fa fa-plus-circle" style="margin-right: 8px;"></i>
            創建
        </a>
    </li>
    <!-- <li>
        <span class="toolbar-element search">
            <i class="fa fa-search"></i><span>搜尋</span>
            <input type="search" class="form-control input-sm" placeholder="" aria-controls="myTable" style="background-color: rgb(255, 255, 255);">
        </span>
    </li> -->
</ul>
<?php } ?>

<div class="table dataTables_wrapper">
    <table class="table dataTable">
        <tr>
            <th>編號</th>
            <th>名稱</th>
            <th>連結</th>
            <th>在菜單顯示</th>
            <th>菜單排列號碼</th>
            <th>狀態</th>
            <th>創建日期</th>
            <th>修改日期</th>
            <th>動作</th>
        </tr>
        <?php foreach ($tasks as $r) : ?>
            <tr>
                <td><?php echo $r['id']; ?></td>
                <td><?php echo $r['display_name']; ?></td>
                <td><?php echo $r['name']; ?></td>
                <td><?php echo $r['display'] ? '是' : '否'; ?></td>
                <td><?php echo $r['display_order']; ?></td>
                <td><?php echo $r['status'] ? '正常' : '停用'; ?></td>
                <td><?php echo $r['createdate']; ?></td>
                <td><?php echo $r['updatedate']; ?></td>
                <td>
                    <a href="<?php echo site_url('permission/edit/' . $r['id']); ?>" class="btn btn-info btn-xs">修改</a>
                    <!--<a href="<?php echo site_url('permission/remove/' . $r['id']); ?>" class="btn btn-danger btn-xs">刪除</a>-->
                </td>
            </tr>
        <?php endforeach; ?>
    </table>
    <div class="pull-right">
        <?php echo str_replace(array('/index', '\&'), array('', ''), $this->pagination->create_links()); ?>
    </div>
</div>