diff options
author | Björn Geiger | 2011-04-11 13:51:05 +0200 |
---|---|---|
committer | Björn Geiger | 2011-04-11 13:51:05 +0200 |
commit | b43ff296c311076e8970b40aae80ec79de24adf1 (patch) | |
tree | 8ecd48164f7d43f313c8f26aef5db18aa73ce316 | |
parent | Neues Recht um default Bootmenu zu setzen & Bootmenu-REchte angepasst (diff) | |
download | pbs2-b43ff296c311076e8970b40aae80ec79de24adf1.tar.gz pbs2-b43ff296c311076e8970b40aae80ec79de24adf1.tar.xz pbs2-b43ff296c311076e8970b40aae80ec79de24adf1.zip |
verschiedene Layouts korrigiert
-rw-r--r-- | application/modules/user/views/scripts/group/show.phtml | 94 | ||||
-rw-r--r-- | application/modules/user/views/scripts/group/showall.phtml | 70 | ||||
-rw-r--r-- | application/modules/user/views/scripts/person/index.phtml | 104 | ||||
-rw-r--r-- | application/modules/user/views/scripts/person/show.phtml | 115 | ||||
-rw-r--r-- | application/modules/user/views/scripts/person/showall.phtml | 98 | ||||
-rw-r--r-- | application/modules/user/views/scripts/role/index.phtml | 95 | ||||
-rw-r--r-- | application/modules/user/views/scripts/role/show.phtml | 128 | ||||
-rw-r--r-- | public/media/css/style.css | 11 | ||||
-rw-r--r-- | public/media/css/user.css | 40 | ||||
-rw-r--r-- | public/media/js/user.js | 6 |
10 files changed, 451 insertions, 310 deletions
diff --git a/application/modules/user/views/scripts/group/show.phtml b/application/modules/user/views/scripts/group/show.phtml index ea677ac..19dc396 100644 --- a/application/modules/user/views/scripts/group/show.phtml +++ b/application/modules/user/views/scripts/group/show.phtml @@ -2,7 +2,7 @@ if($this->groupID) { if(isset($this->userIDsNamespace['groupID'])) { ?> -<h1>Group</h1> +<h1>Own Group</h1> <?php echo $this->formButton('deletegroup', 'Delete', array( 'onclick' => 'self.location="/user/group/delete/"', @@ -22,63 +22,61 @@ if($this->groupID) { 'class' => 'rightbutton')); } ?> -<span class="clear"></span> -<table> - <tr> - <th>Title</th> - <th>Description</th> - </tr> - <tr class="entry"> - <td><?php echo $this->group->getTitle(); ?></td> - <td><?php echo $this->group->getDescription(); ?></td> - </tr> +<div class='detailelement'> +<div class='element'> +<div class='content'> +<div class='title'>Title: <span class="noBold"><?php echo $this->group->getTitle(); ?></span></div> +</div> +<div class='clear'></div> +</div> +<div class='element'> +<div class='content'> +<div class='title'>Description: <span class="noBold"><?php echo $this->group->getDescription(); ?></span></div> +</div> +<div class='clear'></div> +</div> <?php if(isset($parentGroup) && is_object($parentGroup)) { ?> - <tr> - <td><b>Superordinated Group:</b></td> - <td><?php echo $this->parentGroup->getTitle(); ?></td> - </tr> - <?php +<div class='element'> +<div class='content'> +<div class='title'>Superordinated Group: <span class="noBold"><?php echo $this->parentGroup->getTitle(); ?></span></div> +</div> +<div class='clear'></div> +</div> + <?php } - ?> -</table> + ?></div> <?php if(isset($this->groupRequestList)) { ?> <br /> <h2>Requests:</h2> -<table> - <tr> - <th>Firstname</th> - <th>Name</th> - <th>email</th> - <th>city</th> - <th>grant</th> - </tr> - <?php - foreach($this->groupRequestList as $grouprequest) { - $grouprequestID = $grouprequest['grouprequestID']; - $person = $grouprequest['person']; - ?> - <tr class="entry"> - <td><?php echo $person->getFirstname(); ?></td> - <td><?php echo $person->getName(); ?></td> - <td><?php echo $person->getEmail(); ?></td> - <td><?php echo $person->getCity(); ?></td> - <td> - <form action="/user/group/grantperson" method="post"><input - type="hidden" name="grouprequestID" - value="<?php echo $grouprequestID; ?>" /> <?php printRoleSelect($this->roleList); ?> - <input type="image" src='/media/img/save.png' alt='Grant Person' - name="confirm" value="confirm" /></form> - </td> - </tr> - <?php - } +<div class='listelement'><?php +foreach($this->groupRequestList as $grouprequest) { + $grouprequestID = $grouprequest['grouprequestID']; + $person = $grouprequest['person']; ?> -</table> +<div class='element'> +<div class='content'> +<div class='actions'> +<form action="/user/group/grantperson" method="post"><input + type="hidden" name="grouprequestID" + value="<?php echo $grouprequestID; ?>" /> <?php printRoleSelect($this->roleList); ?> +<input type="image" src='/media/img/save.png' alt='Grant Person' + name="confirm" value="confirm" /></form> +</div> +<div class='title'><?php echo $person->getTitle(); ?> <?php echo $person->getFirstname(); ?> <?php echo $person->getName(); ?></div> +<div class='subtitle'><?php echo $person->getCity(); ?></div> +<div class='details dispnone'><label>Email</label> +<div class='item'><?php echo $person->getEmail(); ?></div> +</div> +</div> +</div> <?php +} +?></div> +<?php } if(isset($this->membersList)) { ?> @@ -132,5 +130,3 @@ function printRoleSelect($roleList) { echo "</select>"; } ?> -<br /> -<br /> diff --git a/application/modules/user/views/scripts/group/showall.phtml b/application/modules/user/views/scripts/group/showall.phtml index 2ed777a..5e53f87 100644 --- a/application/modules/user/views/scripts/group/showall.phtml +++ b/application/modules/user/views/scripts/group/showall.phtml @@ -6,26 +6,28 @@ ?> <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'> +<div class='listelement'><?php +if(count($this->groupList)==0) +echo "There are no groups" ?> <?php foreach ($this->groupList as $k => $group): ?> +<?php +$class=''; +if($group->getID() == $this->userIDsNamespace['groupID']) +$class= 'highlight checked'; +?> +<div class='element<?php echo " $class";?>'><?php if($group->getID() != $this->userIDsNamespace['groupID']) { + ?> +<div class='number'><?php echo $k+1; ?></div> <?php - $count = 0; - if(count($this->groupList)==0) - echo "There are no groups" ?> - <?php foreach ($this->groupList as $group): ?> - <?php - $class=''; - if($group->getID() == $this->userIDsNamespace['groupID']) - $class= 'highlight checked'; - ?> - <div class='element<?php echo " $class";?>'> - <div class='content'> - <div class='actions'> - <a href="<?php if($group->getID() == $this->userIDsNamespace['groupID']) echo $this->url( +} +?> +<div class='content'> +<div class='actions'><a + href="<?php if($group->getID() == $this->userIDsNamespace['groupID']) echo $this->url( array( 'module' => 'user', 'controller' => 'group', @@ -40,8 +42,9 @@ 'groupID' => $group->getID() ), 'default', - true); ?>"> <img src='/media/img/show.png' alt='Show Group' /></a></td> - <a href="<?php if($group->getID() == $this->userIDsNamespace['groupID']) echo $this->url( + true); ?>"> <img src='/media/img/show.png' alt='Show Group' /></a> +<a + href="<?php if($group->getID() == $this->userIDsNamespace['groupID']) echo $this->url( array( 'module' => 'user', 'controller' => 'group', @@ -56,8 +59,9 @@ 'groupID' => $group->getID() ), 'default', - true); ?>"> <img src='/media/img/edit.png' alt='Edit Group' /></a></td> - <a href="<?php if($group->getID() == $this->userIDsNamespace['groupID']) echo $this->url( + true); ?>"> <img src='/media/img/edit.png' alt='Edit Group' /></a> +<a + href="<?php if($group->getID() == $this->userIDsNamespace['groupID']) echo $this->url( array( 'module' => 'user', 'controller' => 'group', @@ -73,20 +77,26 @@ ), 'default', true); ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a> - </div> - <div class='title'><?php echo $group->getTitle(); ?></div> - <div class='subtitle'><?php echo $group->getDescription(); ?></div> - </div> - <div class='clear'></div> - </div> - <?php $count++; ?> - <?php endforeach ?> </div> +<div class='title'><?php echo $group->getTitle(); ?></div> + <?php if($group->getDescription()) { + ?> +<div class='subtitle'><?php echo $group->getDescription(); ?></div> + <?php + } else { + ?> +<div class='subtitle'> </div> + <?php + } + ?></div> +<div class='clear'></div> +</div> +<?php endforeach ?></div> <?php echo $this->pagination; ?> <?php echo $this->formButton('linkgroups', 'Link Groups', array( 'onclick' => 'self.location="/user/group/link"', 'class' => 'addbutton')) - ?> +?> <br /> <br /> diff --git a/application/modules/user/views/scripts/person/index.phtml b/application/modules/user/views/scripts/person/index.phtml index c285ece..8f91cfd 100644 --- a/application/modules/user/views/scripts/person/index.phtml +++ b/application/modules/user/views/scripts/person/index.phtml @@ -1,25 +1,75 @@ -<h1>Person</h1> +<h1>Own Details</h1> <?php if($this->editRight === true) echo $this->formButton('editperson', 'Edit', array( 'onclick' => 'self.location="/user/person/edit/"', 'class' => 'rightbutton'))?> -<br /> -<br /> -<div class="personColorDiv"><span class="bold">Title:</span> <?php echo $this->person->getTitle(); ?></div> -<div class="personDiv"><span class="bold">Name:</span> <?php echo $this->person->getName(); ?></div> -<div class="personColorDiv"><span class="bold">Firstname:</span> <?php echo $this->person->getFirstname(); ?></div> -<div class="personDiv"><span class="bold">Street:</span> <?php echo $this->person->getStreet(); ?></div> -<div class="personColorDiv"><span class="bold">Housenumber:</span> <?php echo $this->person->getHousenumber(); ?></div> -<div class="personDiv"><span class="bold">City:</span> <?php echo $this->person->getCity(); ?></div> -<div class="personColorDiv"><span class="bold">Postalcode:</span> <?php echo $this->person->getPostalcode(); ?></div> -<div class="personDiv"><span class="bold">Email:</span> <?php echo $this->person->getEmail(); ?></div> -<div class="personColorDiv"><span class="bold">Last Login Date:</span> <?php if( $this->person->getLogindate()) echo date ('d. F Y - H:i', $this->person->getLogindate()) . " Uhr"; ?></div> -<div class="personDiv"><span class="bold">Register Date:</span> <?php echo date ('d. F Y - H:i', $this->person->getRegisterdate()) . ' Uhr'; ?></div> -<?php -if(isset($this->groups)) { - ?> +<div class='detailelement'> +<div class='element'> +<div class='content'> +<div class="title">Title: <span class="noBold"><?php echo $this->person->getTitle(); ?></span></div> +</div> +<div class='clear'></div> +</div> +<div class='element'> +<div class='content'> +<div class="title">Name: <span class="noBold"><?php echo $this->person->getName(); ?></span></div> +</div> +<div class='clear'></div> +</div> +<div class='element'> +<div class='content'> +<div class="title">Firstname: <span class="noBold"><?php echo $this->person->getFirstname(); ?></span></div> +</div> +<div class='clear'></div> +</div> +<div class='element'> +<div class='content'> +<div class="title">Street: <span class="noBold"><?php echo $this->person->getStreet(); ?></span></div> +</div> +<div class='clear'></div> +</div> +<div class='element'> +<div class='content'> +<div class="title">Housenumber: <span class="noBold"><?php echo $this->person->getHousenumber(); ?></span></div> +</div> +<div class='clear'></div> +</div> +<div class='element'> +<div class='content'> +<div class="title">City: <span class="noBold"><?php echo $this->person->getCity(); ?></span></div> +</div> +<div class='clear'></div> +</div> +<div class='element'> +<div class='content'> +<div class="title">Postalcode: <span class="noBold"><?php echo $this->person->getPostalcode(); ?></span></div> +</div> +<div class='clear'></div> +</div> +<div class='element'> +<div class='content'> +<div class="title">Email: <span class="noBold"><?php echo $this->person->getEmail(); ?></span></div> +</div> +<div class='clear'></div> +</div> +<div class='element'> +<div class='content'> +<div class="title">Last Login Date: <span class="noBold"><?php if( $this->person->getLogindate()) echo date ('d. F Y - H:i', $this->person->getLogindate()) . " Uhr"; ?></span></div> +</div> +<div class='clear'></div> +</div> +<div class='element'> +<div class='content'> +<div class="title">Register Date: <span class="noBold"><?php echo date ('d. F Y - H:i', $this->person->getRegisterdate()) . ' Uhr'; ?></span></div> +</div> +<div class='clear'></div> +</div> +</div> <br /> <h2>Member in the following Groups:</h2> - +<?php if($this->groupRequestRight === true) echo $this->formButton('addtogroup', 'Add to additional +Groups', array( + 'onclick' => 'self.location="/user/person/request/"', + 'class' => 'addbutton')); ?> <div class='listelement'><?php if(count($this->groups)==0) echo "You are in no group." ?> <?php foreach ($this->groups as $group): ?> <?php @@ -41,18 +91,18 @@ $class= 'highlight checked'; true) ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a> <?php endif; ?></div> <div class='title'><?php echo $group['title']; ?></div> + <?php if($group['description']) { + ?> <div class='subtitle'><?php echo $group['description']; ?></div> -</div> + <?php + } else { + ?> +<div class='subtitle'> </div> + <?php + } + ?></div> <div class='clear'></div> </div> <?php endforeach ?></div> <?php echo $this->pagination; - -} -if($this->groupRequestRight === true) echo $this->formButton('addtogroup', 'Add to additional -Groups', array( - 'onclick' => 'self.location="/user/person/request/"', - 'class' => 'addbutton')); -?> -<br /> -<br /> + ?>
\ No newline at end of file diff --git a/application/modules/user/views/scripts/person/show.phtml b/application/modules/user/views/scripts/person/show.phtml index 8ebb371..5fb4bde 100644 --- a/application/modules/user/views/scripts/person/show.phtml +++ b/application/modules/user/views/scripts/person/show.phtml @@ -5,41 +5,92 @@ <?php if($this->deleteRight === true) echo $this->formButton('deleteperson', 'Delete', array( 'onclick' => 'self.location="/user/auth/delete/personID/' . $this->personID . '"', 'class' => 'rightbutton')) ?> +<div class='detailelement'> +<div class='element'> +<div class='content'> +<div class="title">Title: <span class="noBold"><?php echo $this->person->getTitle(); ?></span></div> +</div> +<div class='clear'></div> +</div> +<div class='element'> +<div class='content'> +<div class="title">Name: <span class="noBold"><?php echo $this->person->getName(); ?></span></div> +</div> +<div class='clear'></div> +</div> +<div class='element'> +<div class='content'> +<div class="title">Firstname: <span class="noBold"><?php echo $this->person->getFirstname(); ?></span></div> +</div> +<div class='clear'></div> +</div> +<div class='element'> +<div class='content'> +<div class="title">Street: <span class="noBold"><?php echo $this->person->getStreet(); ?></span></div> +</div> +<div class='clear'></div> +</div> +<div class='element'> +<div class='content'> +<div class="title">Housenumber: <span class="noBold"><?php echo $this->person->getHousenumber(); ?></span></div> +</div> +<div class='clear'></div> +</div> +<div class='element'> +<div class='content'> +<div class="title">City: <span class="noBold"><?php echo $this->person->getCity(); ?></span></div> +</div> +<div class='clear'></div> +</div> +<div class='element'> +<div class='content'> +<div class="title">Postalcode: <span class="noBold"><?php echo $this->person->getPostalcode(); ?></span></div> +</div> +<div class='clear'></div> +</div> +<div class='element'> +<div class='content'> +<div class="title">Email: <span class="noBold"><?php echo $this->person->getEmail(); ?></span></div> +</div> +<div class='clear'></div> +</div> +<div class='element'> +<div class='content'> +<div class="title">Last Login Date: <span class="noBold"><?php if( $this->person->getLogindate()) echo date ('d. F Y - H:i', $this->person->getLogindate()) . " Uhr"; ?></span></div> +</div> +<div class='clear'></div> +</div> +<div class='element'> +<div class='content'> +<div class="title">Register Date: <span class="noBold"><?php echo date ('d. F Y - H:i', $this->person->getRegisterdate()) . ' Uhr'; ?></span></div> +</div> +<div class='clear'></div> +</div> +</div> <br /> -<br /> -<div class="personColorDiv"><span class="bold">Title:</span> <?php echo $this->person->getTitle(); ?></div> -<div class="personDiv"><span class="bold">Name:</span> <?php echo $this->person->getName(); ?></div> -<div class="personColorDiv"><span class="bold">Firstname:</span> <?php echo $this->person->getFirstname(); ?></div> -<div class="personDiv"><span class="bold">Street:</span> <?php echo $this->person->getStreet(); ?></div> -<div class="personColorDiv"><span class="bold">Housenumber:</span> <?php echo $this->person->getHousenumber(); ?></div> -<div class="personDiv"><span class="bold">City:</span> <?php echo $this->person->getCity(); ?></div> -<div class="personColorDiv"><span class="bold">Postalcode:</span> <?php echo $this->person->getPostalcode(); ?></div> -<div class="personDiv"><span class="bold">Email:</span> <?php echo $this->person->getEmail(); ?></div> -<div class="personColorDiv"><span class="bold">Last Login Date:</span> <?php if( $this->person->getLogindate()) echo date ('d. F Y - H:i', $this->person->getLogindate()) . " Uhr"; ?></div> -<div class="personDiv"><span class="bold">Register Date:</span> <?php echo date ('d. F Y - H:i', $this->person->getRegisterdate()) . ' Uhr'; ?></div> +<h2>Member in the following Groups:</h2> +<div class='listelement'><?php if(count($this->groups)==0) +echo "You are in no group." ?> <?php foreach ($this->groups as $group): ?> <?php -if(isset($this->groups)) { +$class=''; +if($group['membershipID'] == $this->userIDsNamespace['membershipID']) +$class= 'highlight checked'; +?> +<div class='element<?php echo " $class";?>'> +<div class='content'> +<div class='title'><?php echo $group['title']; ?></div> +<?php if($group['description']) { ?> -<br /> -<h2>Member in the following Groups:</h2> -<table> - <tr> - <th>Title</th> - <th>Description</th> - </tr> +<div class='subtitle'><?php echo $group['description']; ?></div> <?php - foreach($this->groups as $group) { - ?> - <tr class="entry"> - <td><?php echo $group['title']; ?></td> - <td><?php echo $group['description']; ?></td> - </tr> - <?php - } +} else { ?> -</table> - <?php echo $this->pagination; +<div class='subtitle'> </div> + <?php } -?> -<br /> -<br /> +?></div> +<div class='clear'></div> +</div> +<?php endforeach ?></div> +<?php echo $this->pagination; +?>
\ No newline at end of file diff --git a/application/modules/user/views/scripts/person/showall.phtml b/application/modules/user/views/scripts/person/showall.phtml index f20f490..1521744 100644 --- a/application/modules/user/views/scripts/person/showall.phtml +++ b/application/modules/user/views/scripts/person/showall.phtml @@ -1,25 +1,33 @@ <h1>Persons Overview</h1> <?php echo $this->searchform; ?> <div class='searchvars'> - <div class='head'>Available searchfilter:</div> - <div class='code'>title</div> - <div class='code'>name</div> - <div class='code'>firstname</div> - <div class='code'>email</div> +<div class='head'>Available searchfilter:</div> +<div class='code'>title</div> +<div class='code'>name</div> +<div class='code'>firstname</div> +<div class='code'>email</div> </div> -<div class='listelement'> - <?php if(count($this->personList)==0) - echo "There are no Sessions to display." ?> - <?php foreach ($this->personList as $person): ?> - <div class='element'> - <div class='content'> - <div class='actions'> - <?php - if($person->getID() == $this->userIDsNamespace['personID']) { - if($this->showRight === true) { - ?> - <a href="<?php echo $this->url( +<div class='listelement'><?php if(count($this->personList)==0) +echo "There are no Persons to display." ?> <?php foreach ($this->personList as $k => $person): ?> +<?php +$class=''; +if($person->getID() == $this->userIDsNamespace['personID']) +$class= 'highlight checked'; +?> +<div class='element<?php echo " $class";?>'> +<?php if($person->getID() != $this->userIDsNamespace['personID']) { + ?> + <div class='number'><?php echo $k+1; ?></div> +<?php +} +?> +<div class='content'> +<div class='actions'><?php +if($person->getID() == $this->userIDsNamespace['personID']) { + if($this->showRight === true) { + ?> <a + href="<?php echo $this->url( array( 'module' => 'user', 'controller' => 'person', @@ -28,9 +36,9 @@ 'default', true);?>"> <img src='/media/img/show.png' alt='Show Person' /></a> <?php - } - if($this->editRight === true) { ?> - <a href="<?php echo $this->url( + } + if($this->editRight === true) { ?> <a + href="<?php echo $this->url( array( 'module' => 'user', 'controller' => 'person', @@ -39,9 +47,9 @@ 'default', true);?>"> <img src='/media/img/edit.png' alt='Edit Person' /></a> <?php - } - if($this->deleteRight === true) { ?> - <a href="<?php echo $this->url( + } + if($this->deleteRight === true) { ?> <a + href="<?php echo $this->url( array( 'module' => 'user', 'controller' => 'auth', @@ -50,11 +58,11 @@ 'default', true);?>"> <img src='/media/img/delete.png' alt='Delete Account' /></a> <?php - } - } else { - if($this->showOtherRight === true) { - ?> - <a href=" <?php echo $this->url( + } +} else { + if($this->showOtherRight === true) { + ?> <a + href=" <?php echo $this->url( array( 'module' => 'user', 'controller' => 'person', @@ -64,10 +72,10 @@ 'default', true); ?>"> <img src='/media/img/show.png' alt='Show Person' /></a> <?php - } - if($this->editOtherRight === true) { - ?> - <a href=" <?php echo $this->url( + } + if($this->editOtherRight === true) { + ?> <a + href=" <?php echo $this->url( array( 'module' => 'user', 'controller' => 'person', @@ -77,10 +85,10 @@ 'default', true); ?>"> <img src='/media/img/edit.png' alt='Edit Person' /></a> <?php - } - if($this->deleteOtherRight === true) { - ?> - <a href=" <?php echo $this->url( + } + if($this->deleteOtherRight === true) { + ?> <a + href=" <?php echo $this->url( array( 'module' => 'user', 'controller' => 'auth', @@ -90,17 +98,15 @@ 'default', true); ?>"> <img src='/media/img/delete.png' alt='Delete Account' /></a> <?php - } - } - ?> - </div> - <div class='title'><?php echo $person->getTitle(); ?> <?php echo $person->getFirstname(); ?> <?php echo $person->getName(); ?></div> - <div class='subtitle'><?php echo $person->getEmail(); ?></div> - </div> - <div class='clear'></div> - </div> - <?php endforeach ?> + } +} +?></div> +<div class='title'><?php echo $person->getTitle(); ?> <?php echo $person->getFirstname(); ?> <?php echo $person->getName(); ?></div> +<div class='subtitle'><?php echo $person->getEmail(); ?></div> +</div> +<div class='clear'></div> </div> +<?php endforeach ?></div> <?php echo $this->pagination; ?> 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'> </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: <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: <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: <span class="noBold">yes</span></div> + + <?php +} else { + ?> +<div class='title'>Inheritance: <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 /> diff --git a/public/media/css/style.css b/public/media/css/style.css index d1f3b28..54dc213 100644 --- a/public/media/css/style.css +++ b/public/media/css/style.css @@ -338,17 +338,6 @@ div.dsf{ float: left; } -.personDiv { - border: 1px solid #CCC; - margin-bottom: 10px; -} - -.personColorDiv { - border: 1px solid #CCC; - margin-bottom: 10px; - background-color: #FFF5CC; -} - .monospace { font-family: Courier New, monospace; } diff --git a/public/media/css/user.css b/public/media/css/user.css index 204d20b..19d86cd 100644 --- a/public/media/css/user.css +++ b/public/media/css/user.css @@ -21,14 +21,6 @@ text-align: center; } -tr.selectedEntry { - background-color: red; -} - -tr.selectedEntry td { - padding-left: 3px; -} - #rights-element dl fieldset dt { width: 325px; } @@ -153,6 +145,34 @@ tr.selectedEntry td { background-position: 15px center; } +.detailelement { + clear: both; + padding-top: 10px; + margin: 10px 0px; +} + +.detailelement .element { + border: 1px solid black; + margin: 5px 0px; + padding: 5px; + -moz-border-radius: 3px; + border-radius: 3px; + background-color: white; +} + +.detailelement .element:nth-child(even) { + background-color: #F0F8FF; +} + +.detailelement .element .content { + margin-left: 50px; +} + +.detailelement .element .content .title { + font-weight: bold; + font-size: 1.2em; +} + .searchvars { border: 1px solid #000; background-color: #FFFFBB; @@ -175,4 +195,8 @@ tr.selectedEntry td { #uncheckAll-label { width: 5px; +} + +.noBold { + font-weight: normal; }
\ No newline at end of file diff --git a/public/media/js/user.js b/public/media/js/user.js index 01c4721..fdd942f 100644 --- a/public/media/js/user.js +++ b/public/media/js/user.js @@ -1,8 +1,8 @@ $(document).ready(function(){ if($('.listelement .element').find('.dispnone').length >= 1){ - $(this).find('.title').css('cursor','pointer'); - $(this).find('.title').prepend("<span class='toggler'><img src='/media/img/right.png'></span> "); - $(this).find('.title').data('toggle','0'); + $(this).find('.listelement .title').css('cursor','pointer'); + $(this).find('.listelement .title').prepend("<span class='toggler'><img src='/media/img/right.png'></span> "); + $(this).find('.listelement .title').data('toggle','0'); $('.listelement .title').click(function(){ $(this).siblings('.dispnone').toggle(); |