index.phtml
6.71 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
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
114
115
116
117
118
119
120
<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->resource_id)){?>class="active" <?php }?>>
<a href="/system/resource.html">ALL</a>
</li>
<?php
$parentData = Adminx_Models_Resource_Client::getResourceByParentID(0);
foreach($parentData as $key =>$val){
?>
<li <?php if($this->resource_id==$val['id']){?>class="active" <?php }?>>
<a href="/system/resource.html?resource_id=<?php echo $val['id'];?>"><?php echo $val['resource_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>
<th> 状态 </th>
<th> 管理</th>
</tr>
</thead>
<tbody role="alert" aria-live="polite" aria-relevant="all">
<?php foreach($this->resourceData 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['resource_name'];?>
</td>
<td>
<?php
if($val['parent_id'] > 0){
$parentResource = Adminx_Models_Resource_Client::getResourceByID($val['parent_id']);
echo ' '.$parentResource['resource_name'];
}else{
echo '<a href="/system/resource.html?resource_id='.$val['id'].'"><i class="icon-th-list"></i> 根资源</a>';
}
?>
</td>
<td>
<?php echo $val['target'];?>
</td>
<td>
<?php echo date('Y-m-d H:i:s',$val['create_time']);?>
</td>
<td>
<?php if($val['status']==0){ ?>
<span class="label label-danger">已关闭</span>
<?php }else{ ?>
<span class="label label-success">已开启</span>
<?php }?>
</td>
<td>
<ul class="table-controls">
<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>
<?php if($val['parent_id'] > 0){ ?>
<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>
<?php }?>
</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>