summaryrefslogtreecommitdiffstats
path: root/application/modules/user/views/scripts/role/index.phtml
diff options
context:
space:
mode:
authorSimon2011-04-18 12:42:30 +0200
committerSimon2011-04-18 12:42:30 +0200
commit281a9a40960403b4483af33eec5cebab10e32684 (patch)
treef9a3f7602315e7d1c55f664d161186a911ce2952 /application/modules/user/views/scripts/role/index.phtml
parentPbs_Graph bei Minuswerten wird nichts eingefärbt (diff)
downloadpbs2-281a9a40960403b4483af33eec5cebab10e32684.tar.gz
pbs2-281a9a40960403b4483af33eec5cebab10e32684.tar.xz
pbs2-281a9a40960403b4483af33eec5cebab10e32684.zip
Role Controller geändert
Diffstat (limited to 'application/modules/user/views/scripts/role/index.phtml')
-rw-r--r--application/modules/user/views/scripts/role/index.phtml138
1 files changed, 64 insertions, 74 deletions
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'>&nbsp;</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(); ?>&nbsp;</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 />