summaryrefslogtreecommitdiffstats
path: root/application/modules/user/views/scripts/role/show.phtml
blob: 408dcc44246c8d6d16c9f0d070718a5ef5a36cdd (plain) (blame)
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
<?php
if($this->roleID) {
	if(isset($this->userIDsNamespace['roleID'])) {
		?>
<h1>Role</h1>
		<?php
	} else {
		?>
<h1>Role Details</h1>
		<?php
	}
	?>
	<?php echo $this->formButton('deleterole', 'Delete', array(
							'onclick' => 'self.location="/user/role/delete/roleID/' . $this->role->getID() .'"',
							'class' => 'rightbutton'))?>
	<?php echo $this->formButton('editrole', 'Edit', array(
							'onclick' => 'self.location="/user/role/edit/roleID/' . $this->role->getID() .'"',
							'class' => 'rightbutton'))?>
<span class="clear"></span>
<table>
	<tr>
		<th>Title</th>
		<th>Description</th>
		<th>Inheritance</th>
	</tr>
	<tr class="entry">
		<td><?php echo $this->role->getTitle(); ?></td>
		<td><?php echo $this->role->getDescription(); ?></td>
		<td><?php if($this->role->getInheritance() == 1) echo "yes"; else echo "no"; ?></td>
	</tr>
</table>
<br />
<h2>Rights:</h2>
	<?php
	if($this->rightsAvailable === true) {
		echo $this->formButton('linkright', 'Add Right', array(
							'onclick' => 'self.location="/user/role/linkright/roleID/' . $this->role->getID() .'"',
							'class' => 'addbutton'))?>
<br />
		<?php
	}
	?>
	<?php if(isset($this->rightsList)) {
		if(isset($this->rightcategorieslist)) {
			foreach($this->rightcategorieslist as $k => $v) {
				$rights = $this->rightsList[$k];
				?>
<h3><?php echo $v; ?></h3>
<table>
	<tr>
		<th>Title</th>
		<th>Description</th>
		<th>Remove</th>
	</tr>

	<?php
	foreach($rights as $right) {
		?>
	<tr class="entry">
		<td><?php echo $right->getTitle(); ?></td>
		<td><?php echo $right->getDescription(); ?></td>
		<td class='action'><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>
		</td>
	</tr>
	<?php
	}
	?>
</table>
	<?php
			}
		}
	} else {
		?>
<br />
<center>
<h3>No Rights have been added!</h3>
</center>
<?php
}
}