deptaction.phtml
2.59 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
<?php
$resource = Adminx_Models_Dept_Client::getDeptResourceByDeptId($this->dept_id);
$havePurview = Adminx_Models_Profile_Client::getProfilePurview($this->pid, $this->dept_id);
$rolePurview = Adminx_Models_Profile_Purview::rolePurview($this->pid);
foreach($resource as $resourceKey =>$resourceVal){
$resourceAction = Adminx_Models_Resource_Client::getResourceActionByResourceID($resourceVal['resource_id']);
if(empty($resourceAction)){
continue;
}
?>
<div class="form-group">
<label class="col-md-help col-md-1 control-label" style="margin-top: 6px;">
<?php echo $resourceVal['resource_name'];?>:
</label>
<div class="col-md-11">
<?php
foreach($resourceAction as $resourceActionKey=>$resourceActionVal){
$checked = '';
$uniformClass = '';
if(isset($havePurview[$resourceActionVal['id']])){
$checked = 'checked="checked"';
$uniformClass = 'checked';
}
?>
<label class="checkbox-inline">
<div class="checker" id="uniform-profile_purview_<?php echo $this->dept_id.'_'.$resourceActionVal['id'];?>">
<?php if(isset( $rolePurview[$resourceActionVal['id']] )){ ?>
<span class="checked">
<input checked="checked" disabled="disabled" type="checkbox" class="uniform">
</span>
<?php }else{ ?>
<span class="<?php echo $uniformClass;?>">
<input name="profile_purview[<?php echo $this->dept_id;?>][<?php echo $resourceVal['resource_id'];?>][]" <?php echo $checked;?> id="profile_purview_<?php echo $this->dept_id.'_'.$resourceActionVal['id'];?>" type="checkbox" class="uniform" value="<?php echo $resourceActionVal['id'];?>">
</span>
<?php }?>
</div>
<?php echo $resourceActionVal['action_name'];?>
</label>
<?php }?>
<label class="checkbox-inline" id="expires_box_<?php echo $resourceVal['resource_id'];?>">
<input type="text" class="form-control" name="purview_expires[<?php echo $resourceVal['resource_id'];?>]" id="expires_purview_<?php echo $resourceVal['resource_id'];?>" placeholder="过期时间" size="10">
</label>
</div>
</div>
<?php }?>
<input type="hidden" name="dept_purview[]" value="<?php echo $this->dept_id;?>">