summaryrefslogtreecommitdiffstats
path: root/application/modules/dev/views/scripts/role/show.phtml
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/dev/views/scripts/role/show.phtml')
-rw-r--r--application/modules/dev/views/scripts/role/show.phtml68
1 files changed, 67 insertions, 1 deletions
diff --git a/application/modules/dev/views/scripts/role/show.phtml b/application/modules/dev/views/scripts/role/show.phtml
index dcd232b..93f2782 100644
--- a/application/modules/dev/views/scripts/role/show.phtml
+++ b/application/modules/dev/views/scripts/role/show.phtml
@@ -1 +1,67 @@
-<br /><br /><center>View script for controller <b>Role</b> and script/action name <b>show</b></center> \ No newline at end of file
+<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
+ }
+} \ No newline at end of file