summaryrefslogtreecommitdiffstats
path: root/application/modules/dev/views/scripts/role/show.phtml
blob: 93f2782b833f583fcded348d5f932db9d8f8f5bb (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
<h1>Role Details</h1>
<?php
if($this->roleID) {
	?>
	<?php echo $this->formButton('deleterole', 'Delete', array(
							'onclick' => 'self.location="/dev/role/delete/roleID/' . $this->role->getID() .'"',
							'class' => 'rightbutton'))?>
	<?php echo $this->formButton('editrole', 'Edit', array(
							'onclick' => 'self.location="/dev/role/edit/roleID/' . $this->role->getID() .'"',
							'class' => 'rightbutton'))?>
<span class="clear"></span>
<table>
	<tr>
		<th>Title</th>
		<th>Description</th>
	</tr>
	<tr class="entry">
		<td><?php echo $this->role->getTitle(); ?></td>
		<td><?php echo $this->role->getDescription(); ?></td>
	</tr>
</table>
<br />
<h2>Rights:</h2>
	<?php echo $this->formButton('linkright', 'Add Right', array(
							'onclick' => 'self.location="/dev/role/linkright/roleID/' . $this->role->getID() .'"',
							'class' => 'addbutton'))?>
	<?php if(isset($this->rightsList)) {
		?>
<table>
	<tr>
		<th>Title</th>
		<th>Description</th>
		<th>Remove</th>
	</tr>

	<?php
	foreach($this->rightsList 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'	=> 'dev',
						'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
	}
}