permissions.php
2.83 KB
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
<?php
use yii\web\View;
use yii\helpers\Html;
$this->title = $this->params['main_title'].'-'.$this->params['sub_title'];
?>
<div class="col-md-6">
<form id="form" method="POST" action="">
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="form-group">
<div class="col-sm-4">
<input type="text" name="name" class="form-control" required="required" placeholder="权限标签">
</div>
<div class="col-sm-5">
<input type="text" name="description" class="form-control" required="required" placeholder="描述">
</div>
</div>
<div class="form-group">
<div class="col-sm-3">
<button class="btn btn-primary mr5" id="upload_button">添加</button>
</div>
</div>
</div><!-- row -->
</div><!-- panel-body -->
</div><!-- panel -->
</form>
</div>
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
<table class="table mb30">
<thead>
<tr style="white-space:nowrap">
<th><input type="checkbox" onclick="checkall(this)">选择</th>
<th>权限</th>
<th>描述</th>
<th>添加时间</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<?php foreach ($list as $model):?>
<tr data-stock="1" data-source="1" data-status="2" data-id="5011880">
<td><input type="checkbox" value="<?=$model->name?>" name="room[]"></td>
<td><?=$model->name?></td>
<td><?=$model->description?></td>
<td style="white-space:nowrap"><?=date('Y-m-d H:i:s',$model->createdAt)?></td>
<td>
<?php if ($model->name != 'index/index'):?>
<a href="/admin/roledit/?name=<?=$model->name?>" class="btn btn-default btn-white">编辑</a>
<a onclick="return confirm('删除用户组?')" href="/admin/operate/?target=permission&type=del&name=<?=$model->name?>" class="btn btn-danger btn-metro">删除</a>
<?php endif;?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
<!-- table-responsive -->
</div>
<!-- col-md-12 -->
</div>