summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
-rw-r--r--library/Pbs/Filter.php1
-rw-r--r--library/Pbs/NewMember.php63
-rw-r--r--library/Pbs/Search.php13
-rw-r--r--mysqlGraph.pngbin279960 -> 280861 bytes
-rw-r--r--pbs.sql10
-rw-r--r--public/media/css/style.css11
-rw-r--r--public/media/css/user.css40
-rw-r--r--public/media/js/user.js6
-rw-r--r--send-post.html2
28 files changed, 573 insertions, 342 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 />
diff --git a/library/Pbs/Filter.php b/library/Pbs/Filter.php
index 5a83a40..5231e59 100644
--- a/library/Pbs/Filter.php
+++ b/library/Pbs/Filter.php
@@ -420,7 +420,6 @@ class Pbs_Filter{
return $bootmenuID;
}
else{
- echo "<h1>No Result :-(</h1>";
return null;
}
diff --git a/library/Pbs/NewMember.php b/library/Pbs/NewMember.php
new file mode 100644
index 0000000..b73e00a
--- /dev/null
+++ b/library/Pbs/NewMember.php
@@ -0,0 +1,63 @@
+<?php
+
+class Pbs_NewMember{
+
+ public function createDefaults(Application_Model_Membership $membership){
+ $personMapper = new Application_Model_PersonMapper();
+ $bootmenuMapper = new Application_Model_BootMenuMapper();
+ $bootmenuentriesMapper = new Application_Model_BootMenuEntriesMapper();
+ $filterMapper = new Application_Model_FilterMapper();
+ $filterentriesMapper = new Application_Model_FilterEntriesMapper();
+
+ // First we copy the default bootmenu with all the entries
+ $groupID = $membership->getGroupID();
+ $person = $personMapper->find($membership->getPersonID());
+ $personname = $person->getFirstName(). " " . $person->getName();
+
+ $defaultBootmenu = $bootmenuMapper->findBy(array('groupID'=>$groupID, 'defaultbootmenu'=>'1'));
+ $defaultBootmenu = $defaultBootmenu[0];
+
+ $userBootmenu = new Application_Model_BootMenu();
+ $userBootmenu->setID(null);
+ $userBootmenu->setGroupID(null);
+ $userBootmenu->setMembershipID($membership->getID());
+ $userBootmenu->setTitle("Private BootMenu of ".$personname);
+ $userBootmenu->setCreated(time());
+ $userBootmenu->setDefaultbootmenu(0);
+ $userBootmenuID = $bootmenuMapper->save($userBootmenu);
+ $userBootmenu->setID($userBootmenuID);
+
+ # print_a('userbootmenu',$userBootmenu);
+
+ $bootmenuentries = $bootmenuentriesMapper->findBy(array('bootmenuID'=>$defaultBootmenu->getID()));
+ foreach($bootmenuentries as $bme){
+ $bme->setID(null);
+ $bme->setBootmenuID($userBootmenuID);
+ $bootmenuentriesMapper->save($bme);
+ #print_a('bootmenuentry',$bme);
+ }
+
+ // Second we create a filter
+ $filter = new Application_Model_Filter();
+ $filter->setTitle("Private Filter of ".$personname);
+ $filter->setDescription("This filter was automatically created to forward the user to his own bootmenu");
+ $filter->setMembershipID($membership->getID());
+ $filter->setGroupID($membership->getGroupID());
+ $filter->setBootmenuID($userBootmenuID);
+ $filter->setCreated(time());
+ $filter->setPriority(25);
+ $filterID = $filterMapper->save($filter);
+ # print_a('filter',$filter);
+
+ $filterentry = new Application_Model_FilterEntries();
+ $filterentry->setFilterID($filterID);
+ $filterentry->setFiltertypeID(5);
+ $filterentry->setFiltervalue($membership->getID());
+ $filterentriesMapper->save($filterentry);
+ # print_a('filterentry',$filterentry);
+
+
+ }
+}
+
+?>
diff --git a/library/Pbs/Search.php b/library/Pbs/Search.php
index 9f25d03..a148b08 100644
--- a/library/Pbs/Search.php
+++ b/library/Pbs/Search.php
@@ -8,9 +8,17 @@ class Pbs_Search{
private $module;
private $countall;
private $countresult;
+ private $type;
public function searchForm(){
- $str = "<form style='float:left;' action='/user/".$this->module."/search'>
+ $str = "<form style='float:left;' action='";
+ if($this->type == ''){
+ $str .= "/user/".$this->module."/search";
+ }
+ else{
+ $str .= "/user/".$this->module."/search/type/".$this->type;
+ }
+ $str .= "'>
<input type='text' id='search' name='search' ".(($this->searchTerm != '')?'value="'.htmlentities($this->searchTerm, ENT_QUOTES).'"':'').">
<button type='submit' class='searchbutton' value='search'> Search</button>";
@@ -67,6 +75,9 @@ class Pbs_Search{
public function setModule($m){
$this->module = $m;
}
+ public function setType($t){
+ $this->type = $t;
+ }
public function setSearchTerm($search){
$this->searchTerm = trim($search);
diff --git a/mysqlGraph.png b/mysqlGraph.png
index f24c35b..54d0ae5 100644
--- a/mysqlGraph.png
+++ b/mysqlGraph.png
Binary files differ
diff --git a/pbs.sql b/pbs.sql
index 0d0c6f3..0d64807 100644
--- a/pbs.sql
+++ b/pbs.sql
@@ -19,7 +19,7 @@ CREATE TABLE IF NOT EXISTS `pbs_right` (
`rightID` int(11) NOT NULL AUTO_INCREMENT,
`rightcategoryID` int(11) NOT NULL,
`shortcut` varchar(10) COLLATE utf8_unicode_ci NOT NULL UNIQUE,
- `title` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
+ `title` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
`description` varchar(300) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`rightID`),
KEY `rightcategoryID` (`rightcategoryID`)
@@ -159,7 +159,7 @@ CREATE TABLE IF NOT EXISTS `pbs_bootmenu` (
`bootmenuID` int(11) NOT NULL AUTO_INCREMENT,
`membershipID` int(11),
`groupID` int(11),
- `title` varchar(30) NOT NULL,
+ `title` varchar(50) NOT NULL,
`created` varchar(14) NOT NULL,
`defaultbootmenu` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`bootmenuID`),
@@ -286,7 +286,7 @@ ALTER TABLE `pbs_poolentries`
CREATE TABLE IF NOT EXISTS `pbs_filter` (
`filterID` int(11) NOT NULL AUTO_INCREMENT,
`membershipID` int(11),
- `groupID` int(11) NOT NULL,
+ `groupID` int(11),
`bootmenuID` int(11) NOT NULL,
`title` varchar(30) NOT NULL,
`description` varchar(140),
@@ -504,6 +504,8 @@ INSERT INTO `pbs`.`pbs_right` (`rightID`, `rightcategoryID`, `shortcut`, `title`
(NULL, '8', 'booai', 'Show admin interface of BootMenu', NULL),
-- User-BootMenu anzeigen
(NULL, '8', 'booui', 'Show user interface of BootMenu', NULL),
+ -- Defautl Bootmenu setzen
+(NULL, '8', 'boodbm', 'Set default BootMenu', NULL),
-- BootMenu anlegen
(NULL, '8', 'booc', 'Create BootMenu', NULL),
-- BootMenu löschen
@@ -578,4 +580,4 @@ INSERT INTO `pbs`.`pbs_group` (`groupID` ,`title` ,`description`)VALUES
(1, 'OpenSLX', 'This is the OpenSLX-Group');
INSERT INTO `pbs`.`pbs_role` (`roleID`, `groupID`, `title`, `description`, `inheritance`) VALUES (1, '1', 'SuperAdmin', 'The SuperAdmin', 0);
INSERT INTO `pbs`.`pbs_rightroles` (`roleID`, `rightID`) VALUES
-(1, 1),(1, 2),(1, 3),(1, 4),(1, 5),(1, 6),(1, 7),(1, 8),(1, 9),(1, 10),(1, 11),(1, 12),(1, 13),(1, 14),(1, 15),(1, 16),(1, 17),(1, 18),(1, 19),(1, 20),(1, 21),(1, 22),(1, 23),(1, 24),(1, 25),(1, 26),(1, 27),(1, 28),(1, 29),(1, 30),(1, 31),(1, 32),(1, 33),(1, 34),(1, 35),(1, 36),(1, 37),(1, 38),(1, 39),(1, 40),(1, 41),(1, 42),(1, 43),(1, 44),(1, 45),(1, 46),(1, 47),(1, 48),(1, 49),(1, 50),(1, 51),(1, 52),(1, 53),(1, 54),(1, 55),(1, 56),(1, 57),(1, 58),(1, 59),(1, 60),(1, 61),(1, 62),(1, 63),(1, 64),(1, 65),(1, 66),(1, 67),(1, 68),(1, 69),(1, 70),(1, 71),(1, 72),(1, 73),(1, 74),(1, 75),(1, 76),(1, 77),(1, 78),(1, 79),(1, 80),(1, 81),(1, 82),(1, 83),(1, 84),(1, 85),(1, 86),(1, 87),(1, 88),(1, 89),(1, 90),(1, 91),(1, 92),(1, 93);
+(1, 1),(1, 2),(1, 3),(1, 4),(1, 5),(1, 6),(1, 7),(1, 8),(1, 9),(1, 10),(1, 11),(1, 12),(1, 13),(1, 14),(1, 15),(1, 16),(1, 17),(1, 18),(1, 19),(1, 20),(1, 21),(1, 22),(1, 23),(1, 24),(1, 25),(1, 26),(1, 27),(1, 28),(1, 29),(1, 30),(1, 31),(1, 32),(1, 33),(1, 34),(1, 35),(1, 36),(1, 37),(1, 38),(1, 39),(1, 40),(1, 41),(1, 42),(1, 43),(1, 44),(1, 45),(1, 46),(1, 47),(1, 48),(1, 49),(1, 50),(1, 51),(1, 52),(1, 53),(1, 54),(1, 55),(1, 56),(1, 57),(1, 58),(1, 59),(1, 60),(1, 61),(1, 62),(1, 63),(1, 64),(1, 65),(1, 66),(1, 67),(1, 68),(1, 69),(1, 70),(1, 71),(1, 72),(1, 73),(1, 74),(1, 75),(1, 76),(1, 77),(1, 78),(1, 79),(1, 80),(1, 81),(1, 82),(1, 83),(1, 84),(1, 85),(1, 86),(1, 87),(1, 88),(1, 89),(1, 90),(1, 91),(1, 92),(1, 93),(1, 94);
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();
diff --git a/send-post.html b/send-post.html
index f3ae995..6cad8c8 100644
--- a/send-post.html
+++ b/send-post.html
@@ -22,7 +22,7 @@
<legend>http://pbs2.local/</legend>
<form action='http://pbs2.local/' method='post'>
<label>serialnumber</label>
- <input type='text' name='serialnumber' value='123456789'></br>
+ <input type='text' name='serialnumber' value='10-20-30-40-50'></br>
<label>Mac</label>
<input type='text' name='mac' value='00:0c:29:01:63:88'></br>
<label>Hardwarehash</label>