summaryrefslogtreecommitdiffstats
path: root/application/modules/dev/views/scripts/role
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/dev/views/scripts/role')
-rw-r--r--application/modules/dev/views/scripts/role/add.phtml5
-rw-r--r--application/modules/dev/views/scripts/role/delete.phtml1
-rw-r--r--application/modules/dev/views/scripts/role/edit.phtml11
-rw-r--r--application/modules/dev/views/scripts/role/groupselect.phtml4
-rw-r--r--application/modules/dev/views/scripts/role/index.phtml62
-rw-r--r--application/modules/dev/views/scripts/role/linkright.phtml5
-rw-r--r--application/modules/dev/views/scripts/role/show.phtml68
-rw-r--r--application/modules/dev/views/scripts/role/unlinkright.phtml1
8 files changed, 150 insertions, 7 deletions
diff --git a/application/modules/dev/views/scripts/role/add.phtml b/application/modules/dev/views/scripts/role/add.phtml
index 5277b9d..4f96cf0 100644
--- a/application/modules/dev/views/scripts/role/add.phtml
+++ b/application/modules/dev/views/scripts/role/add.phtml
@@ -1 +1,4 @@
-<br /><br /><center>View script for controller <b>Role</b> and script/action name <b>add</b></center> \ No newline at end of file
+<?php
+$this->addForm->setAction($this->url());
+echo $this->addForm;
+?> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/role/delete.phtml b/application/modules/dev/views/scripts/role/delete.phtml
deleted file mode 100644
index 6b0ebf1..0000000
--- a/application/modules/dev/views/scripts/role/delete.phtml
+++ /dev/null
@@ -1 +0,0 @@
-<br /><br /><center>View script for controller <b>Role</b> and script/action name <b>delete</b></center> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/role/edit.phtml b/application/modules/dev/views/scripts/role/edit.phtml
index c30d295..c976a90 100644
--- a/application/modules/dev/views/scripts/role/edit.phtml
+++ b/application/modules/dev/views/scripts/role/edit.phtml
@@ -1 +1,10 @@
-<br /><br /><center>View script for controller <b>Role</b> and script/action name <b>edit</b></center> \ No newline at end of file
+<?php
+if(isset($this->addForm)) {
+ $this->addForm->setAction('/etc/role/add');
+ echo $this->addForm;
+}
+else {
+ $this->editForm->setAction($this->url());
+ echo $this->editForm;
+}
+?>
diff --git a/application/modules/dev/views/scripts/role/groupselect.phtml b/application/modules/dev/views/scripts/role/groupselect.phtml
new file mode 100644
index 0000000..fe81758
--- /dev/null
+++ b/application/modules/dev/views/scripts/role/groupselect.phtml
@@ -0,0 +1,4 @@
+<?php
+$this->groupSelectForm->setAction($this->url());
+echo $this->groupSelectForm;
+?> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/role/index.phtml b/application/modules/dev/views/scripts/role/index.phtml
index d30131e..59b66d7 100644
--- a/application/modules/dev/views/scripts/role/index.phtml
+++ b/application/modules/dev/views/scripts/role/index.phtml
@@ -1 +1,61 @@
-<br /><br /><center>View script for controller <b>Role</b> and script/action name <b>index</b></center> \ No newline at end of file
+<?php
+if($this->groupID) {
+ ?>
+<h1>Roles</h1>
+ <?php echo $this->formButton('addrole', 'Add Role', array(
+ 'onclick' => 'self.location="/dev/role/add"',
+ 'class' => 'addbutton'))?>
+<table>
+ <tr>
+ <th>Title</th>
+ <th colspan=3>Actions</th>
+ </tr>
+ <?php
+ $count = 0;
+ foreach($this->roleList as $role) {
+ ?>
+ <tr class="entry">
+ <td><?php echo $role['title'] ?></td>
+ <td class='action'><a
+ href="<?php echo $this->url(
+ array(
+ 'module' => 'dev',
+ 'controller' => 'role',
+ 'action' => 'show',
+ 'roleID' => $role['roleID']
+ ),
+ 'default',
+ true) ?>"> <img src='/media/img/show.png' alt='Show Group' /></a></td>
+ <td class='action'><a
+ href="<?php echo $this->url(
+ array(
+ 'module' => 'dev',
+ 'controller' => 'role',
+ 'action' => 'edit',
+ 'roleID' => $role['roleID']
+ ),
+ 'default',
+ true) ?>"> <img src='/media/img/edit.png' alt='Edit Group' /></a></td>
+ <td class='action'><a
+ href="<?php echo $this->url(
+ array(
+ 'module' => 'dev',
+ 'controller' => 'role',
+ 'action' => 'delete',
+ 'roleID' => $role['roleID']
+ ),
+ 'default',
+ true) ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a>
+ </td>
+ </tr>
+ <?php
+ $count++;
+ }
+ ?>
+</table>
+<?php echo $this->formButton('changeGroup', 'Change Group', array(
+ 'onclick' => 'self.location="/dev/role/changegroup"',
+ 'class' => 'rightbutton'))?>
+<?php
+}
+?> \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/role/linkright.phtml b/application/modules/dev/views/scripts/role/linkright.phtml
index bfba9db..94ad343 100644
--- a/application/modules/dev/views/scripts/role/linkright.phtml
+++ b/application/modules/dev/views/scripts/role/linkright.phtml
@@ -1 +1,4 @@
-<br /><br /><center>View script for controller <b>Role</b> and script/action name <b>linkright</b></center> \ No newline at end of file
+<?php
+$this->linkForm->setAction($this->url());
+echo $this->linkForm;
+?> \ No newline at end of file
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
diff --git a/application/modules/dev/views/scripts/role/unlinkright.phtml b/application/modules/dev/views/scripts/role/unlinkright.phtml
deleted file mode 100644
index 8c7615d..0000000
--- a/application/modules/dev/views/scripts/role/unlinkright.phtml
+++ /dev/null
@@ -1 +0,0 @@
-<br /><br /><center>View script for controller <b>Role</b> and script/action name <b>unlinkright</b></center> \ No newline at end of file