index.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
use yii\helpers\Url;
use app\ht\widgets\LinkPager;
$this->title = '权限列表';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="panel panel-default">
<div class="panel-body">
<form action="" method="get" class="filter-form">
<table width="100%">
<thead>
<tr>
<th style="width:5%"></th>
<th style="width:40%"></th>
<th style="width:20%"></th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="btn btn-primary" href="<?=Url::toRoute("/system/perm/create")?>"><i class="glyphicon glyphicon-plus"></i> 添加权限</a></td>
<td> <input type="text" class="form-control" name="keyword" value="<?= $get['keyword'] ?>" placeholder="输入权限名或路由" style="width:95%"></td>
<td>
<button type="submit" class="btn btn-primary">搜索</button>
<a href="<?php echo Url::toRoute('/system/perm/index'); ?>" class="btn btn-default">重置</a>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<?php if (!empty($perms)) : ?>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th style="width:5%;">ID</th>
<th style="width:20%;">权限名称</th>
<th style="width:55%;">路由</th>
<th style="width:20%;">操作</th>
</tr>
</thead>
<tbody>
<?php foreach ($perms as $perm) : ?>
<tr>
<td><?= $perm['id'] ?></td>
<td><?= $perm['name'] ?></td>
<td><?= $perm['route'] ?></td>
<td>
<a href="<?php echo Url::toRoute(['/system/perm/update', 'id' => $perm['id']]) ?>">编辑</a> |
<a onclick="confirmRedirect('<?= Url::toRoute(['/system/perm/delete', 'id' => $perm['id']]) ?>')" title="删除" href="javascript:void(0)">删除</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else : ?>
<p class="text-center">
没有找到数据
</p>
<?php endif; ?>
</div>
<div class="panel-footer">
<div class="hqy-panel-pager">
<?= LinkPager::widget([
'pagination' => $pages,
]); ?>
<div class="clearfix"></div>
</div>
</div>
</div>