From 8159b6bb65b9b69a7a2ef737d4fa11a5232c10f1 Mon Sep 17 00:00:00 2001 From: Björn Geiger Date: Mon, 11 Apr 2011 10:59:36 +0200 Subject: ACL im RoleController --- .../modules/user/views/scripts/role/index.phtml | 27 ++++++++++++++++++---- .../modules/user/views/scripts/role/show.phtml | 19 +++++++++------ 2 files changed, 35 insertions(+), 11 deletions(-) (limited to 'application/modules/user/views/scripts') diff --git a/application/modules/user/views/scripts/role/index.phtml b/application/modules/user/views/scripts/role/index.phtml index 2fb27bc..baee6e4 100644 --- a/application/modules/user/views/scripts/role/index.phtml +++ b/application/modules/user/views/scripts/role/index.phtml @@ -2,14 +2,20 @@ if($this->userIDsNamespace['groupID']) { ?>

Roles

- searchform; ?> - formButton('addrole', 'Add Role', array( + searchform; + if($this->addRight) echo $this->formButton('addrole', 'Add Role', array( 'onclick' => 'self.location="/user/role/add"', - 'class' => 'addbutton'))?> + 'class' => 'addbutton')); + ?> - + detailsRight || $this->editRight || $this->deleteRight) { + echo ''; + } + ?> userIDsNamespace['groupID']) { userIDsNamespace['roleID']) echo 'class="selectedEntry"'; else echo 'class="entry"'; ?>> + detailsRight) { + ?> + editRight) { + ?> + deleteRight) { + ?> + roleID) {

Role Details

- formButton('deleterole', 'Delete', array( + if($this->deleteRight) echo $this->formButton('deleterole', 'Delete', array( 'onclick' => 'self.location="/user/role/delete/roleID/' . $this->role->getID() .'"', - 'class' => 'rightbutton'))?> - formButton('editrole', 'Edit', array( + 'class' => 'rightbutton')); + if($this->editRight) echo $this->formButton('editrole', 'Edit', array( 'onclick' => 'self.location="/user/role/edit/roleID/' . $this->role->getID() .'"', - 'class' => 'rightbutton'))?> + 'class' => 'rightbutton')); + ?>
Title titleActionsActions
Show Group Edit Group Delete Group
@@ -33,7 +33,7 @@ if($this->roleID) {

Rights:

rightsAvailable === true) { - echo $this->formButton('linkright', 'Add Rights', array( + if($this->addRightToRoleRight) echo $this->formButton('linkright', 'Add Rights', array( 'onclick' => 'self.location="/user/role/linkright/roleID/' . $this->role->getID() .'"', 'class' => 'addbutton'))?>
@@ -51,7 +51,7 @@ if($this->roleID) { - + removeRightOfRoleRight) echo ''; ?> roleID) { + removeRightOfRoleRight) { + ?> +
Title DescriptionRemoveRemove
getTitle(); ?> getDescription(); ?> Remove Right