action.phtml 5.9 KB
<div class="row">
    <div style="height: 2px;"></div>
    <div class="col-md-12">
        <div class="widget box">
            <div class="widget-content no-padding">
                <div id="DataTables_Table_0_wrapper" class="dataTables_wrapper form-inline" role="grid">
                    <div class="row">
                        <div class="dataTables_header clearfix">
                            <div class="col-md-6" style="width:100%;">

                                <div class="tabbable tabbable-custom" style="float:inherit;width:70%;margin-bottom:0px;">
                                    <ul class="nav nav-tabs">
                                        <li <?php if(empty($this->dept_id)){?>class="active" <?php }?>>
                                            <a href="/system/resource/action.html">ALL</a>
                                        </li>
                                        <?php
                                        $deptData = Adminx_Models_Dept_Client::getDeptAll();
                                        foreach($deptData as $key =>$val){
                                        ?>
                                        <li <?php if($this->dept_id==$val['id']){?>class="active" <?php }?>>
                                            <a href="/system/resource/action.html?dept_id=<?php echo $val['id'];?>"><?php echo $val['dept_name'];?></a>
                                        </li>
                                        <?php }?>
                                    </ul>
                                </div>

                                <div class="dataTables_filter" style="float: right;">
                                    <form action="/system/resource.html" method="get">
                                        <div class="input-group">
                                            <span class="input-group-addon" style="padding:0px;">
                                                <button class="btn btn-xs btn-primary" style="height: 30px;">
                                                    <i class="icon-search"></i>
                                                </button>
                                            </span>
                                            <input type="text" name="resource_name" placeholder="资源名称" class="form-control">
                                        </div>
                                    </form>
                                </div>

                            </div>
                        </div>
                    </div>
                    <table class="table table-striped table-bordered table-hover table-checkable table-responsive datatable dataTable" id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info">
                        <thead>
                        <tr role="row">
                            <th class="checkbox-column sorting_disabled" role="columnheader" rowspan="1" colspan="1" aria-label="">
                                <input type="checkbox" class="uniform">
                            </th>
                            <th> 功能名称 </th>
                            <th> 归属资源 </th>
                            <th> 访问规则 </th>
                            <th> 管理</th>
                        </tr>
                        </thead>
                        <tbody role="alert" aria-live="polite" aria-relevant="all">
                        <?php foreach($this->resourceActionData as $key =>$val){ ?>
                        <tr>
                            <td class="checkbox-column  sorting_1">
                                <div class="checker"><span><input type="checkbox" class="uniform"></span></div>
                            </td>
                            <td>
                                <?php echo $val['action_name'];?>
                            </td>
                            <td>
                                <?php
                                    $parentResource = Adminx_Models_Resource_Client::getResourceByID($val['resource_id']);
                                    if(!empty($parentResource)){
                                        echo '<a href="/system/resource/action.html?dept_id='.$val['dept_id'].'&resource_id='.$val['resource_id'].'"><i class="icon-th-list"></i>&nbsp;'.$parentResource['resource_name'].'</a>';
                                    }
                                ?>
                            </td>
                            <td>
                                <?php echo $val['pattern'];?>
                            </td>
                            <td>
                                <ul class="table-controls">
                                    &nbsp;&nbsp;
                                    <li>
                                        <a href="/system/resource/edit.html?resource_id=<?php echo $val['id'];?>" class="bs-tooltip" title="Edit" data-original-title="Edit">
                                            <i class="icon-pencil"></i>
                                        </a>
                                    </li>
                                    &nbsp;&nbsp;
                                    <li>
                                        <a href="/system/resource/del.html?resource_id=<?php echo $val['id'];?>" class="bs-tooltip" title="Delete" data-original-title="Delete">
                                            <i class="icon-trash"></i>
                                        </a>
                                    </li>
                                </ul>
                            </td>
                        </tr>
                        <?php }?>
                        </tbody>
                    </table>
                    <div class="row">
                        <div class="dataTables_footer clearfix">
                              <?php $this->paging->view();?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>