summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authormichael pereira2011-04-11 14:29:29 +0200
committermichael pereira2011-04-11 14:29:29 +0200
commit4d63a9525b3601dbd2e24328c1ef250ad605765d (patch)
tree02179f65307191d7ae3997c38a5276ced038b134 /application
parentkcl fix im ressource controller (diff)
parentMerge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff)
downloadpbs2-4d63a9525b3601dbd2e24328c1ef250ad605765d.tar.gz
pbs2-4d63a9525b3601dbd2e24328c1ef250ad605765d.tar.xz
pbs2-4d63a9525b3601dbd2e24328c1ef250ad605765d.zip
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application')
-rw-r--r--application/models/BootMenuMapper.php2
-rw-r--r--application/models/MembershipMapper.php2
-rw-r--r--application/modules/fbgui/controllers/IndexController.php16
-rw-r--r--application/modules/fbgui/views/scripts/index/index.phtml2
-rw-r--r--application/modules/user/controllers/BootmenuController.php8
-rw-r--r--application/modules/user/controllers/ConfigController.php1
-rw-r--r--application/modules/user/controllers/GroupController.php7
-rw-r--r--application/modules/user/controllers/PersonController.php15
-rw-r--r--application/modules/user/forms/Preboot.php2
-rw-r--r--application/modules/user/layouts/user.phtml6
-rw-r--r--application/modules/user/views/scripts/bootmenu/index.phtml4
-rw-r--r--application/modules/user/views/scripts/filter/index.phtml1
-rw-r--r--application/modules/user/views/scripts/group/show.phtml94
-rw-r--r--application/modules/user/views/scripts/group/showall.phtml70
-rw-r--r--application/modules/user/views/scripts/person/index.phtml103
-rw-r--r--application/modules/user/views/scripts/person/show.phtml115
-rw-r--r--application/modules/user/views/scripts/person/showall.phtml98
-rw-r--r--application/modules/user/views/scripts/role/index.phtml95
-rw-r--r--application/modules/user/views/scripts/role/show.phtml128
19 files changed, 456 insertions, 313 deletions
diff --git a/application/models/BootMenuMapper.php b/application/models/BootMenuMapper.php
index 1730181..1717cf6 100644
--- a/application/models/BootMenuMapper.php
+++ b/application/models/BootMenuMapper.php
@@ -78,7 +78,7 @@ class Application_Model_BootMenuMapper
if (null === ($id = $botmenu->getID()) ) {
unset($data['bootmenuID']);
- $this->getDbTable()->insert($data);
+ return $this->getDbTable()->insert($data);
} else {
$this->getDbTable()->update($data, array('bootmenuID = ?' => $id));
}
diff --git a/application/models/MembershipMapper.php b/application/models/MembershipMapper.php
index 67b4985..94f5236 100644
--- a/application/models/MembershipMapper.php
+++ b/application/models/MembershipMapper.php
@@ -78,7 +78,7 @@ class Application_Model_MembershipMapper
if (null === ($id = $membership->getID()) ) {
unset($data['membershipID']);
- $this->getDbTable()->insert($data);
+ return $this->getDbTable()->insert($data);
} else {
$this->getDbTable()->update($data, array('membershipID = ?' => $id));
}
diff --git a/application/modules/fbgui/controllers/IndexController.php b/application/modules/fbgui/controllers/IndexController.php
index bfd2bec..3567f70 100644
--- a/application/modules/fbgui/controllers/IndexController.php
+++ b/application/modules/fbgui/controllers/IndexController.php
@@ -55,23 +55,27 @@ class Fbgui_IndexController extends Zend_Controller_Action
$pbsFilter = new Pbs_Filter();
$bootmenuID = $pbsFilter->evaluate();
if($bootmenuID != null){
- print_a('Debug Output',
- 'Session is now set',
- 'Your sessionID is '.$session->getID(),
- 'Your alphasessionID is '.$session->getAlphasessionID(),
- 'Your client is '.$session->getClientID(),
- 'goto bootmenu '.$bootmenuID);
+ /*
+ print_a('Debug Output',
+ 'Session is now set',
+ 'Your sessionID is '.$session->getID(),
+ 'Your alphasessionID is '.$session->getAlphasessionID(),
+ 'Your client is '.$session->getClientID(),
+ 'goto bootmenu '.$bootmenuID);
+ */
$bootmenuentriesMapper = new Application_Model_BootMenuEntriesMapper();
$res = $bootmenuentriesMapper->findBy(array('bootmenuID' => $bootmenuID),false);
$this->view->entries = $res;
}
else{
+ /*
print_a('Debug Output',
'Session is now set',
'Your sessionID is '.$session->getID(),
'Your alphasessionID is '.$session->getAlphasessionID(),
'Your client is '.$session->getClientID(),
'there is no bootmenu for you');
+ */
echo "<a href='/fbgui/auth/login/'>Goto Login to get a Bootmenu</a>";
}
}
diff --git a/application/modules/fbgui/views/scripts/index/index.phtml b/application/modules/fbgui/views/scripts/index/index.phtml
index 1fe02d4..6917643 100644
--- a/application/modules/fbgui/views/scripts/index/index.phtml
+++ b/application/modules/fbgui/views/scripts/index/index.phtml
@@ -33,9 +33,7 @@
<input type="hidden" class="id" value="<?php echo $entry->getID();?>"/>
</div>
<?php endforeach; ?>
-
<input style="display:none;" type='text' id="selectedBootOs" />
-
<button style='cursor:pointer;float:right;margin-top:10px;' onClick="start();"><img id='startball' src='/media/img/button-red.png'> <span style='font-size:14px;'>Start System</span></button>
<div class='clear'></div>
<?php endif;?>
diff --git a/application/modules/user/controllers/BootmenuController.php b/application/modules/user/controllers/BootmenuController.php
index a7bfb56..e60679a 100644
--- a/application/modules/user/controllers/BootmenuController.php
+++ b/application/modules/user/controllers/BootmenuController.php
@@ -8,6 +8,7 @@ class user_BootmenuController extends Zend_Controller_Action
protected $membershipMapper;
protected $membership;
protected $page;
+ protected $type;
public function init()
{
@@ -109,7 +110,8 @@ class user_BootmenuController extends Zend_Controller_Action
// Search
$search = $this->_request->getParam('search');
$mySearch = new Pbs_Search();
- $mySearch->setSearchTerm($search);
+ $mySearch->setSearchTerm($search);
+ $mySearch->setType($this->type);
$mySearch->setModule('bootmenu');
if($search != ''){
$this->view->search = $mySearch->getSearchTerm();
@@ -255,7 +257,7 @@ class user_BootmenuController extends Zend_Controller_Action
{
//ACL Is he allowed to set Bootmenu as Default?
- if(!Pbs_Acl::checkRight('booai'))
+ if(!Pbs_Acl::checkRight('boodbm'))
$this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
try{
@@ -444,7 +446,7 @@ class user_BootmenuController extends Zend_Controller_Action
if($this->membership->getID() != $bootmenu->getMembershipID() || !Pbs_Acl::checkRight('booeeo'))
$this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
}else{
- if($this->membership->getGroupID() != $bootmenu->getGroupID() || !Pbs_Acl::checkRight('booee'))
+ if($this->membership->getGroupID() != $bootmenu->getGroupID() || (!Pbs_Acl::checkRight('booee') && !Pbs_Acl::checkRight('booeem')))
$this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
}
diff --git a/application/modules/user/controllers/ConfigController.php b/application/modules/user/controllers/ConfigController.php
index 6f5497a..a38af00 100644
--- a/application/modules/user/controllers/ConfigController.php
+++ b/application/modules/user/controllers/ConfigController.php
@@ -74,6 +74,7 @@ class user_ConfigController extends Zend_Controller_Action
$search = $this->_request->getParam('search');
$mySearch = new Pbs_Search();
$mySearch->setSearchTerm($search);
+ $mySearch->setType($this->type);
$mySearch->setModule('config');
if($search != ''){
$this->view->search = $mySearch->getSearchTerm();
diff --git a/application/modules/user/controllers/GroupController.php b/application/modules/user/controllers/GroupController.php
index a17c571..a853a75 100644
--- a/application/modules/user/controllers/GroupController.php
+++ b/application/modules/user/controllers/GroupController.php
@@ -261,7 +261,12 @@ class User_GroupController extends Zend_Controller_Action
$membership->setPersonID($groupRequest->getPersonID());
$membership->setRoleID($_POST['roleID']);
try {
- $this->membershipMapper->save($membership);
+ $id = $this->membershipMapper->save($membership);
+
+ $membership->setID($id);
+
+ $newMember = new Pbs_NewMember();
+ $newMember->createDefaults($membership);
} catch(Zend_Exception $e)
{
echo "Caught exception: " . get_class($e) . "<br/>";
diff --git a/application/modules/user/controllers/PersonController.php b/application/modules/user/controllers/PersonController.php
index 9cdf258..ad8f596 100644
--- a/application/modules/user/controllers/PersonController.php
+++ b/application/modules/user/controllers/PersonController.php
@@ -46,9 +46,9 @@ class user_PersonController extends Zend_Controller_Action
public function indexAction()
{
- if(!Pbs_Acl::checkRight('psod')) {
- $this->_redirect('/user');
- }
+ #if(!Pbs_Acl::checkRight('psod')) {
+ # $this->_redirect('/user');
+ #}
$this->view->person = $this->person;
// Pagination
$pagination = new Pbs_Pagination();
@@ -60,7 +60,8 @@ class user_PersonController extends Zend_Controller_Action
$this->view->groups = $pagination->getElements();
$this->view->pagination = $pagination->pagination($pageurl);
$this->view->page = $pagination->getRequestPage();
- $this->view->groupRequestRight = Pbs_Acl::checkRight('grm');
+ // This should be activated in case the person has no membership and no rights.
+ $this->view->groupRequestRight = true;
$this->view->editRight = Pbs_Acl::checkRight('peoa');
$this->view->leaveRight = Pbs_Acl::checkRight('gl');
$this->view->userIDsNamespace = Zend_Session::namespaceGet('userIDs');
@@ -129,9 +130,9 @@ class user_PersonController extends Zend_Controller_Action
public function requestAction()
{
- if(!Pbs_Acl::checkRight('grm')) {
- $this->_redirect('/user');
- }
+ #if(!Pbs_Acl::checkRight('grm')) {
+ # $this->_redirect('/user');
+ #}
$this->view->person = $this->person;
$allgroups = $this->groupMapper->fetchAll();
$groupRequests = $this->groupRequestMapper->findBy(array('personID' => $this->person->getID()),true);
diff --git a/application/modules/user/forms/Preboot.php b/application/modules/user/forms/Preboot.php
index 99c7563..9d2f3aa 100644
--- a/application/modules/user/forms/Preboot.php
+++ b/application/modules/user/forms/Preboot.php
@@ -18,7 +18,7 @@ class user_Form_Preboot extends Zend_Form
$this->setName($this->action);
$this->setMethod('post');
- if (!Pbs_Acl::checkRight('pre'))
+ if ((!Pbs_Acl::checkRight('pre') && $this->action == 'editpreboot'))
$meta = true;
else
$meta = null;
diff --git a/application/modules/user/layouts/user.phtml b/application/modules/user/layouts/user.phtml
index b27b747..32569c9 100644
--- a/application/modules/user/layouts/user.phtml
+++ b/application/modules/user/layouts/user.phtml
@@ -29,10 +29,12 @@ echo $this->headScript()."\n";
<li class='navTreeItem'><a href='/user/'>user</a></li>
<li>
<ul class='navTreeLevel1'>
+ <?php if(Zend_Auth::getInstance()->hasIdentity()) {
+ echo "<li class='navTreeItem'><a href='/user/person'>Own Details</a></li>";
+ }
+ ?>
<?php if (Zend_Auth::getInstance()->hasIdentity() && count(Zend_Session::namespaceGet('userIDs')) > 0) {
# This should be splitted
- if(Pbs_Acl::checkRight('psod'))
- echo "<li class='navTreeItem'><a href='/user/person'>Own Details</a></li>";
if(Pbs_Acl::checkRight('pso'))
echo "<li class='navTreeItem'><a href='/user/person/showall'>Personlist</a></li>";
if(Pbs_Acl::checkRight('gsdo'))
diff --git a/application/modules/user/views/scripts/bootmenu/index.phtml b/application/modules/user/views/scripts/bootmenu/index.phtml
index 4393c1f..cda6f87 100644
--- a/application/modules/user/views/scripts/bootmenu/index.phtml
+++ b/application/modules/user/views/scripts/bootmenu/index.phtml
@@ -7,7 +7,7 @@
<?php if((Pbs_Acl::checkRight('booc') && $this->type== 'group') || (Pbs_Acl::checkRight('booco') && $this->type == 'own')): ?>
<?php echo $this->formButton('createbootmenu', 'Create BootMenu', array(
- 'onclick' => 'self.location="/user/bootmenu/createbootmenu/type/'.$this->type.'page/'.$this->page.'"',
+ 'onclick' => 'self.location="/user/bootmenu/createbootmenu/type/'.$this->type.'/page/'.$this->page.'"',
'class' => 'addbutton'))?>
<?php endif;?>
@@ -39,7 +39,7 @@
<div class='number'><?php echo $k+1 ?></div>
<div class='content'>
<div class='actions'>
- <?php if(Pbs_Acl::checkRight('booai') && $this->type == 'group'): ?>
+ <?php if(Pbs_Acl::checkRight('boodbm') && $this->type == 'group'): ?>
<?php if($bootmenu->getDefaultbootmenu() == true): ?>
<a><img src='/media/img/default.png' alt='Checked as default'/></a>
<?php else: ?>
diff --git a/application/modules/user/views/scripts/filter/index.phtml b/application/modules/user/views/scripts/filter/index.phtml
index 098c43d..a242a7b 100644
--- a/application/modules/user/views/scripts/filter/index.phtml
+++ b/application/modules/user/views/scripts/filter/index.phtml
@@ -1,5 +1,6 @@
<h1>Filters</h1>
<?php if($this->notification != ''){echo $this->notification;} ?>
+<div class='infobox'>The default userfilters uses the priority 25</div>
<?php echo $this->searchform; ?>
<?php if(Pbs_Acl::checkRight('fa')):?>
<?php echo $this->formButton('createconfig', 'Create Filter', array(
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:&nbsp;<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:&nbsp;<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:&nbsp;<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(); ?>&nbsp;<?php echo $person->getFirstname(); ?>&nbsp;<?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'>&nbsp;</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 7c6fc8d..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>&nbsp;<?php echo $this->person->getTitle(); ?></div>
-<div class="personDiv"><span class="bold">Name:</span>&nbsp;<?php echo $this->person->getName(); ?></div>
-<div class="personColorDiv"><span class="bold">Firstname:</span>&nbsp;<?php echo $this->person->getFirstname(); ?></div>
-<div class="personDiv"><span class="bold">Street:</span>&nbsp;<?php echo $this->person->getStreet(); ?></div>
-<div class="personColorDiv"><span class="bold">Housenumber:</span>&nbsp;<?php echo $this->person->getHousenumber(); ?></div>
-<div class="personDiv"><span class="bold">City:</span>&nbsp;<?php echo $this->person->getCity(); ?></div>
-<div class="personColorDiv"><span class="bold">Postalcode:</span>&nbsp;<?php echo $this->person->getPostalcode(); ?></div>
-<div class="personDiv"><span class="bold">Email:</span>&nbsp;<?php echo $this->person->getEmail(); ?></div>
-<div class="personColorDiv"><span class="bold">Last Login Date:</span>&nbsp;<?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>&nbsp;<?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:&nbsp;<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:&nbsp;<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:&nbsp;<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:&nbsp;<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:&nbsp;<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:&nbsp;<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:&nbsp;<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:&nbsp;<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:&nbsp;<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:&nbsp;<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,17 +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'>&nbsp;</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:&nbsp;<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:&nbsp;<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:&nbsp;<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:&nbsp;<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:&nbsp;<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:&nbsp;<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:&nbsp;<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:&nbsp;<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:&nbsp;<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:&nbsp;<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>&nbsp;<?php echo $this->person->getTitle(); ?></div>
-<div class="personDiv"><span class="bold">Name:</span>&nbsp;<?php echo $this->person->getName(); ?></div>
-<div class="personColorDiv"><span class="bold">Firstname:</span>&nbsp;<?php echo $this->person->getFirstname(); ?></div>
-<div class="personDiv"><span class="bold">Street:</span>&nbsp;<?php echo $this->person->getStreet(); ?></div>
-<div class="personColorDiv"><span class="bold">Housenumber:</span>&nbsp;<?php echo $this->person->getHousenumber(); ?></div>
-<div class="personDiv"><span class="bold">City:</span>&nbsp;<?php echo $this->person->getCity(); ?></div>
-<div class="personColorDiv"><span class="bold">Postalcode:</span>&nbsp;<?php echo $this->person->getPostalcode(); ?></div>
-<div class="personDiv"><span class="bold">Email:</span>&nbsp;<?php echo $this->person->getEmail(); ?></div>
-<div class="personColorDiv"><span class="bold">Last Login Date:</span>&nbsp;<?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>&nbsp;<?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'>&nbsp;</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(); ?>&nbsp;<?php echo $person->getFirstname(); ?>&nbsp;<?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'>&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 />