diff options
| author | michael pereira | 2011-04-18 16:33:17 +0200 |
|---|---|---|
| committer | michael pereira | 2011-04-18 16:33:17 +0200 |
| commit | bada6bd9bade4a5cb3b87fed44a2de9a2a599010 (patch) | |
| tree | 3af1a31a11bdc12528f1cd19e7358f0de385ee7e /application/modules/user/views/scripts | |
| parent | API-Key bei Membership & BootOS über API fertig (diff) | |
| parent | FilterLibrary - Escapen von Argumenten (diff) | |
| download | pbs2-bada6bd9bade4a5cb3b87fed44a2de9a2a599010.tar.gz pbs2-bada6bd9bade4a5cb3b87fed44a2de9a2a599010.tar.xz pbs2-bada6bd9bade4a5cb3b87fed44a2de9a2a599010.zip | |
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application/modules/user/views/scripts')
3 files changed, 75 insertions, 81 deletions
diff --git a/application/modules/user/views/scripts/auth/delete.phtml b/application/modules/user/views/scripts/auth/delete.phtml index 83afc80..75d9ef6 100644 --- a/application/modules/user/views/scripts/auth/delete.phtml +++ b/application/modules/user/views/scripts/auth/delete.phtml @@ -1,6 +1,7 @@ <h1>Delete Account</h1> -Do you really want to delete account? +Do you really want to delete account?<br/> +This will delete all of your data on the server. <?php $this->deleteconfirmform->setAction($this->url()); echo $this->deleteconfirmform; -?>
\ No newline at end of file +?> diff --git a/application/modules/user/views/scripts/role/index.phtml b/application/modules/user/views/scripts/role/index.phtml index edf03eb..580238f 100644 --- a/application/modules/user/views/scripts/role/index.phtml +++ b/application/modules/user/views/scripts/role/index.phtml @@ -1,6 +1,4 @@ -<?php -if($this->userIDsNamespace['groupID']) { - ?> + <h1>Roles</h1> <?php echo $this->searchform; @@ -9,82 +7,74 @@ if($this->userIDsNamespace['groupID']) { 'class' => 'addbutton')); ?> <div class='searchvars'> -<div class='head'>Available searchfilter:</div> -<div class='code'>title</div> -<div class='code'>description</div> + <div class='head'>Available searchfilter:</div> + <div class='code'>title</div> + <div class='code'>description</div> </div> -<div class='listelement'><?php -if(count($this->roleList)==0) -echo "There are no roles" ?> <?php foreach($this->roleList as $k => $role): ?> -<?php -$class=''; -if($role['roleID'] == $this->userIDsNamespace['roleID']) -$class= 'highlight checked'; -?> - <div class='element<?php echo " $class";?>'> - <?php if($role['roleID'] != $this->userIDsNamespace['roleID']) { ?> - <div class='number'> - <div class='smallnumber'>Role</div> - <?php echo $role['roleID']; ?> - </div> +<div class='listelement'> +<?php if(count($this->roleList)==0) + echo "There are no roles" ?> +<?php foreach($this->roleList as $i => $grouproleList): ?> + <?php foreach($grouproleList as $k => $role): ?> <?php - } - ?> - <div class='content'> - <div class='actions'><?php if($this->detailsRight) {?> - <a href="<?php echo $this->url( - array( - 'module' => 'user', - 'controller' => 'role', - 'action' => 'show', - 'roleID' => $role['roleID'] - ), - 'default', - true) ?>"> <img src='/media/img/show.png' alt='Show Group' /></a> <?php - } - if($this->editRight) { ?> - <a href="<?php echo $this->url( - array( - 'module' => 'user', - 'controller' => 'role', - 'action' => 'edit', - 'roleID' => $role['roleID'] - ), - 'default', - true) ?>"> <img src='/media/img/edit.png' alt='Edit Group' /></a> <?php - } -if($this->deleteRight) { ?> - <a href="<?php echo $this->url( - array( - 'module' => 'user', - 'controller' => 'role', - 'action' => 'delete', - 'roleID' => $role['roleID'] - ), - 'default', - true) ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a> - -<?php } ?> -</div> -<div class='title'><?php echo $role['title'] ?></div> - <?php if($role['description']) { - ?> -<div class='subtitle'><?php echo $role['description']; ?></div> - <?php - } else { - ?> -<div class='subtitle'> </div> - <?php - } + $class=''; + if($role->getID() == $this->membership->getRoleID()) + $class= 'highlight checked'; + ?> + <div class='element<?php echo " $class";?>'> + <?php if($role->getID() != $this->userIDsNamespace['roleID']) { ?> + <div class='number'> + <div class='smallnumber'>Role</div> + <?php echo $role->getID(); ?> + </div> + <?php + } + ?> + <div class='content'> + <div class='actions'><?php if($this->detailsRight) {?> + <a href="<?php echo $this->url( + array( + 'module' => 'user', + 'controller' => 'role', + 'action' => 'show', + 'roleID' => $role->getID() + ), + 'default', + true) ?>"> <img src='/media/img/show.png' alt='Show Group' /></a> <?php + } + if($this->editRight && $this->membership->getGroupID() == $role->getGroupID()) { ?> + <a href="<?php echo $this->url( + array( + 'module' => 'user', + 'controller' => 'role', + 'action' => 'edit', + 'roleID' => $role->getID() + ), + 'default', + true) ?>"> <img src='/media/img/edit.png' alt='Edit Group' /></a> <?php + } + if($this->deleteRight && $this->membership->getGroupID() == $role->getGroupID()) { ?> + <a href="<?php echo $this->url( + array( + 'module' => 'user', + 'controller' => 'role', + 'action' => 'delete', + 'roleID' => $role->getID() + ), + 'default', + true) ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a> -?></div> -<div class='clear'></div> + <?php } ?> + </div> + <div class='title'><?php echo "[".$i."] ";?><?php echo $role->getTitle();?></div> + <div class='subtitle'><?php echo $role->getDescription(); ?> </div></div> + <div class='clear'></div> + </div> + <?php endforeach ?> +<?php endforeach ?> </div> -<?php endforeach ?></div> -<?php echo $this->pagination; -} -?> +<?php echo $this->pagination; ?> <br /> <br /> diff --git a/application/modules/user/views/scripts/role/show.phtml b/application/modules/user/views/scripts/role/show.phtml index 43ae781..0e440f2 100644 --- a/application/modules/user/views/scripts/role/show.phtml +++ b/application/modules/user/views/scripts/role/show.phtml @@ -9,10 +9,12 @@ if($this->roleID) { <h1>Role Details</h1> <?php } - if($this->deleteRight) echo $this->formButton('deleterole', 'Delete', array( + if($this->deleteRight && $this->role->getGroupID() == $this->membership->getGroupID()) + echo $this->formButton('deleterole', 'Delete', array( 'onclick' => 'self.location="/user/role/delete/roleID/' . $this->role->getID() .'"', 'class' => 'rightbutton')); - if($this->editRight) echo $this->formButton('editrole', 'Edit', array( + if($this->editRight && $this->role->getGroupID() == $this->membership->getGroupID()) + echo $this->formButton('editrole', 'Edit', array( 'onclick' => 'self.location="/user/role/edit/roleID/' . $this->role->getID() .'"', 'class' => 'rightbutton')); ?> @@ -38,7 +40,7 @@ if($this->roleID) { <h2>Rights:</h2> <?php if($this->rightsAvailable === true) { - if($this->addRightToRoleRight) { + if($this->addRightToRoleRight && $this->role->getGroupID() == $this->membership->getGroupID()) { echo $this->formButton('linkright', 'Add Rights', array( 'onclick' => 'self.location="/user/role/linkright/roleID/' . $this->role->getID() .'"', 'class' => 'addbutton'))?> @@ -48,7 +50,8 @@ if($this->rightsAvailable === true) { if(count($this->rightsList)==0) { echo "There are no Rights to display."; } else { - if($this->removeRightOfRoleRight) echo $this->formButton('deleteallrights', 'Delete All Rights', array( + if($this->removeRightOfRoleRight && $this->role->getGroupID() == $this->membership->getGroupID()) + echo $this->formButton('deleteallrights', 'Delete All Rights', array( 'onclick' => 'self.location="/user/role/unlinkright/rightrolesID/' . $this->roleID . '-all"', 'class' => 'rightbutton'));?> <br /> @@ -63,7 +66,7 @@ if(count($this->rightsList)==0) { foreach($rights as $right): ?> <div class='element'> -<div class='content'><?php if($this->removeRightOfRoleRight) { +<div class='content'><?php if($this->removeRightOfRoleRight && $this->role->getGroupID() == $this->membership->getGroupID()) { ?> <div class='actions'><a href="<?php echo $this->url( |
