1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
| <link rel="stylesheet" href="/themes/AdminLTE/plugins/datatables/dataTables.bootstrap.css">
|
| <section class="content-header">
| <h1>
| 用户组管理
| </h1>
| <ol class="breadcrumb">
| <li><a href="/admin/index/index"><i class="fa fa-dashboard"></i> 平台首台</a></li>
| <li><a href="/role/role/list">用户组管理</a></li>
| <li class="active">用户组列表</li>
| </ol>
| </section>
|
| <!-- Main content -->
| <section class="content">
| <div class="row">
| <div class="col-xs-12">
| <div class="box">
| <div class="box-header">
| <h3 class="box-title">用户组列表</h3>
| </div>
|
| <!-- /.box-header -->
| <div class="box-body">
| <table id="table_list" class="table table-bordered table-hover">
| <thead>
| <tr>
| <th>用户组名称</th>
| <th>用户组描述</th>
| <th>创建时间</th>
| <th>操作</th>
| </tr>
| </thead>
| </table>
| </div>
| <!-- /.box-body -->
| </div>
| <!-- /.box -->
| </section>
|
| <script>
| $(function () {
| var config = {
| "dom": 'l<"#toolbar">frtip',
| /*
| * 默认为false
| * 当表格在处理的时候(比如排序操作)是否显示“处理中...”
| * 当表格的数据中的数据过多以至于对其中的记录进行排序时会消耗足以被察觉的时间的时候,该选项会有些用处
| */
| "processing":true,
| /*
| * 默认为true
| * 是否允许终端用户从一个选择列表中选择分页的页数,页数为10,25,50和100,需要分页组件bPaginate的支持
| */
| "lengthChange":false,
| "serverSide":true,
| "autoWidth": true,
| "language":{
| "lengthMenu": "每页显示 _MENU_ 条",
| "emptyTable": "没有任何数据记录",
| "processing": "正在载入数据...",
| "search": "搜索 _INPUT_",
| "info": "显示 _START_ 至 _END_ 项结果,共 _TOTAL_ 项",
| "zeroRecords": "暂时没有任何数据记录",
| "sInfoEmpty": "",
| "paginate": {
| "first": "首页",
| "previous": "上一页",
| "next": "下一页",
| "last": "尾页"
| },
| },
| "ajax":{
| "url": "/role/role/list",
| "type":"POST",
| },
| "columns":[
| {
| "data":"name",
| "orderable":false
| },
| {
| "data":"description",
| "orderable":false
| },
| {
| "data":"create_time",
| "orderable":false
| },
| {
| "data":null,
| "orderable":false
| },
| ],
| "columnDefs": [
| {
| "targets":3,
| "searchable":false,
| "render":function(data, type, row, meta){
| return '<a class="btn btn-primary" href="/<?php echo $route['module']?>/<?php echo $route['controller']?>/edit/id/'+row['_id']+'">编辑</a>'
| }
| }
| ],
| "initComplete": function(){
| $("#toolbar").css("width", "100px").css("display", "inline").css("margin-left", "10px");
| $("#toolbar").append('<a id="build" class="btn btn-success" data-toggle="modal" data-target="" href="/<?php echo $route['module']?>/<?php echo $route['controller']?>/add"> <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>添加 <a> ');
| }
|
| }
| $("#table_list").DataTable(config);
| });
| </script>
|
|