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
|
<?php
if($this->roleID) {
if(isset($this->userIDsNamespace['roleID'])) {
?>
<h1>Role</h1>
<?php
} else {
?>
<h1>Role Details</h1>
<?php
}
if($this->deleteRight) echo $this->formButton('deleterole', 'Delete', array(
'onclick' => 'self.location="/user/role/delete/roleID/' . $this->role->getID() .'"',
'class' => 'rightbutton'));
if($this->editRight) echo $this->formButton('editrole', 'Edit', array(
'onclick' => 'self.location="/user/role/edit/roleID/' . $this->role->getID() .'"',
'class' => 'rightbutton'));
?>
<div class='detailelement'>
<div class='element'>
<div class='content'>
<div class='title'>Title: <span class="noBold"><?php echo $this->role->getTitle(); ?></span></div>
</div>
<div class='clear'></div>
</div>
<div class='element'>
<div class='content'>
<div class='title'>Description: <span class="noBold"><?php echo $this->role->getDescription(); ?></span></div>
</div>
<div class='clear'></div>
</div>
<div class='element'>
<div class='content'><?php
if($this->role->getInheritance()) {
?>
<div class='title'>Inheritance: <span class="noBold">yes</span></div>
<?php
} else {
?>
<div class='title'>Inheritance: <span class="noBold">no</span></div>
<?php
}
?></div>
<div class='clear'></div>
</div>
</div>
<br />
<h2>Rights:</h2>
<?php
if($this->rightsAvailable === true) {
if($this->addRightToRoleRight) {
echo $this->formButton('linkright', 'Add Rights', array(
'onclick' => 'self.location="/user/role/linkright/roleID/' . $this->role->getID() .'"',
'class' => 'addbutton'))?>
<?php
}
}
if(count($this->rightsList)==0) {
echo "There are no Rights to display.";
} else {
if($this->removeRightOfRoleRight) echo $this->formButton('deleteallrights', 'Delete All Rights', array(
'onclick' => 'self.location="/user/role/unlinkright/rightrolesID/' . $this->roleID . '-all"',
'class' => 'rightbutton'));?>
<br />
<?php
if(isset($this->rightcategorieslist)) {
foreach($this->rightcategorieslist as $k => $v):
$rights = $this->rightsList[$k];
if(count($rights) > 0) {
?>
<h3><?php echo $v; ?>:</h3>
<div class='listelement'><?php
foreach($rights as $right):
?>
<div class='element'>
<div class='content'><?php if($this->removeRightOfRoleRight) {
?>
<div class='actions'><a
href="<?php echo $this->url(
array(
'module' => 'user',
'controller' => 'role',
'action' => 'unlinkright',
'rightrolesID' => $this->roleID . '-' . $right->getID(),
),
'default',
true) ?>"> <img src='/media/img/delete.png' alt='Remove Right' /></a>
</div>
<?php
}
?>
<div class="title"><?php echo $right->getTitle(); ?></div>
<?php
if($right->getDescription()) {
?>
<div class="item"><?php echo $right->getDescription(); ?></div>
<?php
}
?></div>
<div class='clear'></div>
</div>
<?php
endforeach
?></div>
<?php
}
?>
<br />
<?php
endforeach;
}
}
}
?>
|