summaryrefslogtreecommitdiffstats
path: root/application/modules/user/views/scripts/role
diff options
context:
space:
mode:
authorBjörn Geiger2011-04-11 13:51:05 +0200
committerBjörn Geiger2011-04-11 13:51:05 +0200
commitb43ff296c311076e8970b40aae80ec79de24adf1 (patch)
tree8ecd48164f7d43f313c8f26aef5db18aa73ce316 /application/modules/user/views/scripts/role
parentNeues Recht um default Bootmenu zu setzen & Bootmenu-REchte angepasst (diff)
downloadpbs2-b43ff296c311076e8970b40aae80ec79de24adf1.tar.gz
pbs2-b43ff296c311076e8970b40aae80ec79de24adf1.tar.xz
pbs2-b43ff296c311076e8970b40aae80ec79de24adf1.zip
verschiedene Layouts korrigiert
Diffstat (limited to 'application/modules/user/views/scripts/role')
-rw-r--r--application/modules/user/views/scripts/role/index.phtml95
-rw-r--r--application/modules/user/views/scripts/role/show.phtml128
2 files changed, 119 insertions, 104 deletions
diff --git a/application/modules/user/views/scripts/role/index.phtml b/application/modules/user/views/scripts/role/index.phtml
index baee6e4..cc34869 100644
--- a/application/modules/user/views/scripts/role/index.phtml
+++ b/application/modules/user/views/scripts/role/index.phtml
@@ -8,26 +8,30 @@ if($this->userIDsNamespace['groupID']) {
'onclick' => 'self.location="/user/role/add"',
'class' => 'addbutton'));
?>
-<table>
- <tr>
- <th>Title <span class='code'>title</span></th>
- <?php
- if($this->detailsRight || $this->editRight || $this->deleteRight) {
- echo '<th colspan=3>Actions</th>';
- }
- ?>
- </tr>
+<div class='searchvars'>
+<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'><?php echo $k+1; ?></div>
<?php
- $count = 0;
- foreach($this->roleList as $role) {
- ?>
- <tr
- <?php if($role['roleID'] == $this->userIDsNamespace['roleID']) echo 'class="selectedEntry"'; else echo 'class="entry"'; ?>>
- <td><?php echo $role['title'] ?></td>
- <?php if($this->detailsRight) {
- ?>
- <td class='action'><a
- href="<?php echo $this->url(
+}
+?>
+<div class='content'>
+<div class='actions'><?php if($this->detailsRight) {
+ ?> <a
+ href="<?php echo $this->url(
array(
'module' => 'user',
'controller' => 'role',
@@ -35,13 +39,11 @@ if($this->userIDsNamespace['groupID']) {
'roleID' => $role['roleID']
),
'default',
- true) ?>"> <img src='/media/img/show.png' alt='Show Group' /></a></td>
- <?php
- }
- if($this->editRight) {
- ?>
- <td class='action'><a
- href="<?php echo $this->url(
+ 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',
@@ -49,13 +51,11 @@ if($this->userIDsNamespace['groupID']) {
'roleID' => $role['roleID']
),
'default',
- true) ?>"> <img src='/media/img/edit.png' alt='Edit Group' /></a></td>
- <?php
- }
- if($this->deleteRight) {
- ?>
- <td class='action'><a
- href="<?php echo $this->url(
+ 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',
@@ -64,17 +64,24 @@ if($this->userIDsNamespace['groupID']) {
),
'default',
true) ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a>
- </td>
- <?php
- }
- ?>
- </tr>
- <?php
- $count++;
- }
- ?>
-</table>
- <?php echo $this->pagination;
+</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
+ }
+
+}
+?></div>
+<div class='clear'></div>
+</div>
+<?php endforeach ?></div>
+<?php echo $this->pagination;
}
?>
<br />
diff --git a/application/modules/user/views/scripts/role/show.phtml b/application/modules/user/views/scripts/role/show.phtml
index e91c106..8f4bb50 100644
--- a/application/modules/user/views/scripts/role/show.phtml
+++ b/application/modules/user/views/scripts/role/show.phtml
@@ -16,54 +16,63 @@ if($this->roleID) {
'onclick' => 'self.location="/user/role/edit/roleID/' . $this->role->getID() .'"',
'class' => 'rightbutton'));
?>
-<span class="clear"></span>
-<table>
- <tr>
- <th>Title</th>
- <th>Description</th>
- <th>Inheritance</th>
- </tr>
- <tr class="entry">
- <td><?php echo $this->role->getTitle(); ?></td>
- <td><?php echo $this->role->getDescription(); ?></td>
- <td><?php if($this->role->getInheritance() == 1) echo "yes"; else echo "no"; ?></td>
- </tr>
-</table>
+<div class='detailelement'>
+<div class='element'>
+<div class='content'>
+<div class='title'>Title:&nbsp;<span class="noBold"><?php echo $this->role->getTitle(); ?></span></div>
+</div>
+<div class='clear'></div>
+</div>
+<div class='element'>
+<div class='content'>
+<div class='title'>Description:&nbsp;<span class="noBold"><?php echo $this->role->getDescription(); ?></span></div>
+</div>
+<div class='clear'></div>
+</div>
+<div class='element'>
+<div class='content'><?php
+if($this->role->getInheritance()) {
+ ?>
+<div class='title'>Inheritance:&nbsp;<span class="noBold">yes</span></div>
+
+ <?php
+} else {
+ ?>
+<div class='title'>Inheritance:&nbsp;<span class="noBold">no</span></div>
+ <?php
+}
+?></div>
+<div class='clear'></div>
+</div>
+</div>
<br />
<h2>Rights:</h2>
- <?php
- if($this->rightsAvailable === true) {
- if($this->addRightToRoleRight) echo $this->formButton('linkright', 'Add Rights', array(
+<?php
+if($this->rightsAvailable === true) {
+ if($this->addRightToRoleRight) {
+ echo $this->formButton('linkright', 'Add Rights', array(
'onclick' => 'self.location="/user/role/linkright/roleID/' . $this->role->getID() .'"',
'class' => 'addbutton'))?>
<br />
<?php
}
- ?>
- <?php if(isset($this->rightsList)) {
- if(isset($this->rightcategorieslist)) {
- foreach($this->rightcategorieslist as $k => $v) {
- $rights = $this->rightsList[$k];
- if(count($rights) > 0) {
- ?>
-<h3><?php echo $v; ?></h3>
-<table>
- <tr>
- <th>Title</th>
- <th>Description</th>
- <?php if($this->removeRightOfRoleRight) echo '<th>Remove</th>'; ?>
- </tr>
-
- <?php
- foreach($rights as $right) {
+}
+if(count($this->rightsList)==0)
+echo "There are no Rights to display.";
+if(isset($this->rightcategorieslist)) {
+ foreach($this->rightcategorieslist as $k => $v):
+ $rights = $this->rightsList[$k];
+ if(count($rights) > 0) {
?>
- <tr class="entry">
- <td><?php echo $right->getTitle(); ?></td>
- <td><?php echo $right->getDescription(); ?></td>
- <?php if($this->removeRightOfRoleRight) {
- ?>
- <td class='action'><a
- href="<?php echo $this->url(
+<h3><?php echo $v; ?>:</h3>
+<div class='listelement'><?php
+foreach($rights as $right):
+?>
+<div class='element'>
+<div class='content'><?php if($this->removeRightOfRoleRight) {
+ ?>
+<div class='actions'><a
+ href="<?php echo $this->url(
array(
'module' => 'user',
'controller' => 'role',
@@ -72,28 +81,27 @@ if($this->roleID) {
),
'default',
true) ?>"> <img src='/media/img/delete.png' alt='Remove Right' /></a>
- </td>
- <?php
- }
- ?>
- </tr>
- <?php
- }
+</div>
+ <?php
+}
+?>
+<div class="title"><?php echo $right->getTitle(); ?></div>
+<?php
+if($right->getDescription()) {
?>
-</table>
+<div class="item"><?php echo $right->getDescription(); ?></div>
<?php
- }
- }
- }
- } else {
- ?>
-<br />
-<center>
-<h3>No Rights have been added!</h3>
-</center>
- <?php
+}
+?></div>
+<div class='clear'></div>
+</div>
+<?php
+endforeach;
}
+ ?></div>
+<br />
+ <?php
+ endforeach;
+}
}
?>
-<br />
-<br />