summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authormichael pereira2011-04-11 01:33:18 +0200
committermichael pereira2011-04-11 01:33:18 +0200
commit0329c68bf7d33e8acdcdcd3e06f9d676cd776025 (patch)
tree13e6c4ecae43a6ad091c501053d6760959f77134 /application
parentMerge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff)
downloadpbs2-0329c68bf7d33e8acdcdcd3e06f9d676cd776025.tar.gz
pbs2-0329c68bf7d33e8acdcdcd3e06f9d676cd776025.tar.xz
pbs2-0329c68bf7d33e8acdcdcd3e06f9d676cd776025.zip
Bootmenu User/Admin View
Diffstat (limited to 'application')
-rw-r--r--application/modules/user/controllers/BootmenuController.php120
-rw-r--r--application/modules/user/controllers/ConfigController.php7
-rw-r--r--application/modules/user/views/scripts/bootmenu/index.phtml34
3 files changed, 98 insertions, 63 deletions
diff --git a/application/modules/user/controllers/BootmenuController.php b/application/modules/user/controllers/BootmenuController.php
index 5689f11..ed2239b 100644
--- a/application/modules/user/controllers/BootmenuController.php
+++ b/application/modules/user/controllers/BootmenuController.php
@@ -16,7 +16,7 @@ class user_BootmenuController extends Zend_Controller_Action
if($userIDsNamespace['membershipID'] ==''){
$this->_redirect('/user/index');
}
-
+
$this->bootmenuMapper = new Application_Model_BootMenuMapper();
$this->bootmenuentryMapper = new Application_Model_BootMenuEntriesMapper();
@@ -26,6 +26,8 @@ class user_BootmenuController extends Zend_Controller_Action
$this->membershipMapper->find($userIDsNamespace['membershipID'],$this->membership);
$this->db = Zend_Db_Table::getDefaultAdapter();
+
+ $this->type = $this->_request->getParam('type');
} else {
$this->_helper->redirector('login', 'auth');
}
@@ -66,7 +68,8 @@ class user_BootmenuController extends Zend_Controller_Action
$bootosMapper = new Application_Model_BootOsMapper();
$configMapper = new Application_Model_ConfigMapper();
- if(Pbs_Acl::checkRight('booai')){
+ if($this->type =='group' && Pbs_Acl::checkRight('booai')){
+ $this->view->type = 'group';
$bootmenu = $this->bootmenuMapper->findBy(array('groupID' => $this->membership->getGroupID()));
foreach ($bootmenu as $bm){
$bm->setCreated(date(Zend_Registry::get('dateformat'),$bm->getCreated()));
@@ -84,7 +87,7 @@ class user_BootmenuController extends Zend_Controller_Action
}
}
}else{
-
+ $this->view->type = 'own';
$bootmenu = $this->bootmenuMapper->findBy(array('membershipID' => $this->membership->getID()));
if($bootmenu != null){
$bootmenu[0]->setCreated(date(Zend_Registry::get('dateformat'),$bootmenu[0]->getCreated()));
@@ -116,21 +119,22 @@ class user_BootmenuController extends Zend_Controller_Action
// Pagination
$pagination = new Pbs_Pagination();
- $pagination->setPerPage(5);
+ $pagination->setPerPage(3);
$pagination->setElement($bootmenu);
$pagination->setRequestPage($this->_request->getParam('page'));
- $pagination->setPageUrl('/user/bootmenu/index'.((isset($this->view->search))?'/search/'.$this->view->search:''));
+ $pagination->setPageUrl('/user/bootmenu/index/type/'.$this->type.((isset($this->view->search))?'/search/'.$this->view->search:''));
$bootmenu = $pagination->getElements();
+ $this->view->pagination = $pagination->pagination($pageurl);
$this->view->page = $pagination->getRequestPage();
+
$this->view->bootmenulist = $bootmenu;
-
$this->view->bootmenuentrylist = $bootmenuentries;
}
public function searchAction(){
- $this->_redirect('/user/bootmenu/index/search/'.($_GET['search']));
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/search/'.($_GET['search']));
}
@@ -138,7 +142,7 @@ class user_BootmenuController extends Zend_Controller_Action
{
//ACL Darf er BootMenus erstellen?
if(!Pbs_Acl::checkRight('booc'))
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/addresult/forbidden');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/forbidden');
if (!isset($_POST["createbootmenu"])){
$bootmenuForm = new user_Form_Bootmenu(array('action' => 'createbootmenu','page' => $this->page));
@@ -158,9 +162,9 @@ class user_BootmenuController extends Zend_Controller_Action
}catch(Zend_Exception $e){
echo "Caught exception: " . get_class($e) . "<br/>";
echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/addresult/error');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/error');
}
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/addresult/ok');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/ok');
}
}
@@ -172,17 +176,17 @@ class user_BootmenuController extends Zend_Controller_Action
//ACL Is he allowed to edit BootMenus?
if(!Pbs_Acl::checkRight('booe'))
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/modifyresult/forbidden');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
$bootmenuID = $this->_request->getParam('bootmenuID');
if (!is_numeric($bootmenuID))
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/modifyresult/forbidden');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
$bootmenu = new Application_Model_BootMenu();
$this->bootmenuMapper->find($bootmenuID, $bootmenu);
if($this->membership->getGroupID() != $bootmenu->getGroupID())
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/modifyresult/forbidden');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
if (!isset($_POST["editbootmenu"])){
@@ -208,10 +212,10 @@ class user_BootmenuController extends Zend_Controller_Action
{
echo "Caught exception: " . get_class($e) . "<br/>";
echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/modifyresult/error');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
}
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/modifyresult/ok');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/ok');
}
}
@@ -224,40 +228,40 @@ class user_BootmenuController extends Zend_Controller_Action
//ACL Is he allowed to delete Bootmenu?
if(!Pbs_Acl::checkRight('bood'))
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/deleteresult/forbidden');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
try{
$bootmenuID = $this->_request->getParam('bootmenuID');
if (!is_numeric($bootmenuID))
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/deleteresult/forbidden');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
$bootmenu = new Application_Model_BootMenu();
$this->bootmenuMapper->find($bootmenuID, $bootmenu);
if($this->membership->getGroupID() != $bootmenu->getGroupID())
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/deleteresult/forbidden');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
$this->bootmenuMapper->delete($bootmenu);
}catch(Zend_Exception $e){
echo "Caught exception: " . get_class($e) . "<br/>";
echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/deleteresult/error');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/error');
}
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/deleteresult/ok');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/ok');
}
public function defaultbootmenuAction()
{
//ACL Is he allowed to set Bootmenu as Default?
- if(!Pbs_Acl::checkRight('booe'))
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/deleteresult/forbidden');
+ if(!Pbs_Acl::checkRight('booai'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
try{
$bootmenuID = $this->_request->getParam('bootmenuID');
if (!is_numeric($bootmenuID))
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/modifyresult/error');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
$bootmenu = new Application_Model_BootMenu();
@@ -276,9 +280,9 @@ class user_BootmenuController extends Zend_Controller_Action
}catch(Zend_Exception $e){
echo "Caught exception: " . get_class($e) . "<br/>";
echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/modifyresult/error');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
}
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/modifyresult/ok');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/ok');
}
@@ -286,14 +290,14 @@ class user_BootmenuController extends Zend_Controller_Action
{
//ACL Darf er BootMenuEntries erstellen?
- if(!Pbs_Acl::checkRight('booae'))
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/addresult/forbidden');
+ if(!Pbs_Acl::checkRight('booae') && !Pbs_Acl::checkRight('booaeo'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/forbidden');
$bootmenuID = $this->_request->getParam('bootmenuID');
$maxorder = $this->_request->getParam('maxorder');
if (!is_numeric($bootmenuID) || !is_numeric($maxorder))
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/modifyresult/error');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
$bootosMapper = new Application_Model_BootOsMapper();
$configMapper = new Application_Model_ConfigMapper();
@@ -321,9 +325,17 @@ class user_BootmenuController extends Zend_Controller_Action
$configlist = array('Preset' => array(), 'Custom' => Array());
$configlist['Preset'] = $configMapper->findBy(array('groupID' => $groupID));
$configlist['Custom'] = $configMapper->findBy(array('membershipID' => $this->membership->getID()));
+
+ $bootmenu = new Application_Model_BootMenu();
+ $this->bootmenuMapper->find($bootmenuID, $bootmenu);
- if($this->membership->getGroupID() != $this->bootmenuMapper->find($bootmenuID)->getGroupID())
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/modifyresult/forbidden');
+ if($bootmenu->getMembershipID() != null){
+ if($this->membership->getID() != $bootmenu->getMembershipID() || !Pbs_Acl::checkRight('booaeo'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/forbidden');
+ }else{
+ if($this->membership->getGroupID() != $bootmenu->getGroupID() || !Pbs_Acl::checkRight('booae'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/forbidden');
+ }
if (!isset($_POST["addbootmenuentry"])){
@@ -373,10 +385,10 @@ class user_BootmenuController extends Zend_Controller_Action
{
echo "Caught exception: " . get_class($e) . "<br/>";
echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/addresult/error');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/error');
}
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/addresult/ok');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/addresult/ok');
}
}
@@ -387,14 +399,14 @@ class user_BootmenuController extends Zend_Controller_Action
public function editbootmenuentryAction()
{
//ACL Is he allowed to edit BootMenus?
- if(!Pbs_Acl::checkRight('booee') && !Pbs_Acl::checkRight('booeem'))
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/modifyresult/forbidden');
+ if(!Pbs_Acl::checkRight('booee') && !Pbs_Acl::checkRight('booeem') && !Pbs_Acl::checkRight('booeeo'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
$bootmenuentryID = $this->_request->getParam('bootmenuentryID');
$maxorder = $this->_request->getParam('maxorder');
$oldorder = $this->_request->getParam('oldorder');
if (!is_numeric($bootmenuentryID) || !is_numeric($maxorder) || !is_numeric($oldorder))
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/modifyresult/error');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
$bootosMapper = new Application_Model_BootOsMapper();
$configMapper = new Application_Model_ConfigMapper();
@@ -428,8 +440,13 @@ class user_BootmenuController extends Zend_Controller_Action
$this->bootmenuentryMapper->find($bootmenuentryID, $bootmenuentry);
$this->bootmenuMapper->find($bootmenuentry->getBootmenuID(), $bootmenu);
- if($this->membership->getGroupID() != $bootmenu->getGroupID())
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/modifyresult/forbidden');
+ if($bootmenu->getMembershipID() != null){
+ 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'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
+ }
if (!isset($_POST["editbootmenuentry"])){
@@ -476,8 +493,8 @@ class user_BootmenuController extends Zend_Controller_Action
$bootmenuentryold->getKcl() != $bootmenuentry->getKcl() ||
$bootmenuentryold->getKclappend() != $bootmenuentry->getKclappend()){
//ACL Is he allowed to edit this?
- if(!Pbs_Acl::checkRight('booee'))
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/modifyresult/forbidden');
+ if(!Pbs_Acl::checkRight('booee') && !Pbs_Acl::checkRight('booeeo'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
}
try {
@@ -492,11 +509,11 @@ class user_BootmenuController extends Zend_Controller_Action
{
echo "Caught exception: " . get_class($e) . "<br/>";
echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/modifyresult/error');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/error');
}
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/modifyresult/ok');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/ok');
}
}
@@ -508,31 +525,36 @@ class user_BootmenuController extends Zend_Controller_Action
public function removebootmenuentryAction()
{
//ACL Is he allowed to delete Bootos?
- if(!Pbs_Acl::checkRight('boode'))
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/deleteresult/forbidden');
+ if(!Pbs_Acl::checkRight('boode') && !Pbs_Acl::checkRight('boodeo'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
try{
$bootmenuentryID = $this->_request->getParam('bootmenuentryID');
if (!is_numeric($bootmenuentryID))
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/deleteresult/forbidden');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
$bootmenuentry = new Application_Model_BootMenuEntries();
$bootmenu = new Application_Model_BootMenu();
$this->bootmenuentryMapper->find($bootmenuentryID, $bootmenuentry);
$this->bootmenuMapper->find($bootmenuentry->getBootmenuID(), $bootmenu);
- if($this->membership->getGroupID() != $bootmenu->getGroupID())
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/deleteresult/forbidden');
-
+ if($bootmenu->getMembershipID() != null){
+ if($this->membership->getID() != $bootmenu->getMembershipID() || !Pbs_Acl::checkRight('boodeo'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
+ }else{
+ if($this->membership->getGroupID() != $bootmenu->getGroupID() || !Pbs_Acl::checkRight('boode'))
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/forbidden');
+ }
+
$this->bootmenuentryMapper->delete($bootmenuentry);
$this->bootmenuentryMapper->orderremove($bootmenuentry);
}catch(Zend_Exception $e){
echo "Caught exception: " . get_class($e) . "<br/>";
echo "Message: " . $e->getMessage() . "<br/>";
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/deleteresult/error');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/error');
}
- $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/deleteresult/ok');
+ $this->_redirect('/user/bootmenu/index/type/'.$this->type.'/page/'.$this->page.'/deleteresult/ok');
}
}
diff --git a/application/modules/user/controllers/ConfigController.php b/application/modules/user/controllers/ConfigController.php
index df32385..6f5497a 100644
--- a/application/modules/user/controllers/ConfigController.php
+++ b/application/modules/user/controllers/ConfigController.php
@@ -26,10 +26,7 @@ class user_ConfigController extends Zend_Controller_Action
$this->db = Zend_Db_Table::getDefaultAdapter();
-
$this->type = $this->_request->getParam('type');
-
-
} else {
$this->_helper->redirector('login', 'auth');
}
@@ -155,10 +152,10 @@ class user_ConfigController extends Zend_Controller_Action
$this->configMapper->find($configID, $config);
if($config->getMembershipID() != null){
- if($this->membership->getID() != $config->getMembershipID())
+ if($this->membership->getID() != $config->getMembershipID() || !Pbs_Acl::checkRight('ceo'))
$this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
}else{
- if($this->membership->getGroupID() != $config->getGroupID())
+ if($this->membership->getGroupID() != $config->getGroupID() || (!Pbs_Acl::checkRight('ce') && !Pbs_Acl::checkRight('cem')))
$this->_redirect('/user/config/index/type/'.$this->type.'/page/'.$this->page.'/modifyresult/forbidden');
}
diff --git a/application/modules/user/views/scripts/bootmenu/index.phtml b/application/modules/user/views/scripts/bootmenu/index.phtml
index 751b648..4393c1f 100644
--- a/application/modules/user/views/scripts/bootmenu/index.phtml
+++ b/application/modules/user/views/scripts/bootmenu/index.phtml
@@ -3,11 +3,20 @@
<div id='notification' style='display:none;'></div>
<?php echo $this->searchform; ?>
-<?php if(Pbs_Acl::checkRight('booc')): ?>
+<?php $conflabel = $this->type == 'group'?'own':'group';?>
+
+<?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/page/'.$this->page.'"',
+ 'onclick' => 'self.location="/user/bootmenu/createbootmenu/type/'.$this->type.'page/'.$this->page.'"',
+ 'class' => 'addbutton'))?>
+<?php endif;?>
+
+<?php if(Pbs_Acl::checkRight('booai')): ?>
+<?php echo $this->formButton('groupbootmenu', 'Show '.$conflabel.' Bootmenu', array(
+ 'onclick' => 'self.location="/user/bootmenu/index/type/'.$conflabel.'/page/'.$this->page.'"',
'class' => 'addbutton'))?>
<?php endif;?>
+
<div class='searchvars'>
<div class='head'>Available searchfilter:</div>
<?php if(Pbs_Acl::checkRight('booai')): ?>
@@ -30,7 +39,7 @@
<div class='number'><?php echo $k+1 ?></div>
<div class='content'>
<div class='actions'>
- <?php if(Pbs_Acl::checkRight('booai')): ?>
+ <?php if(Pbs_Acl::checkRight('booai') && $this->type == 'group'): ?>
<?php if($bootmenu->getDefaultbootmenu() == true): ?>
<a><img src='/media/img/default.png' alt='Checked as default'/></a>
<?php else: ?>
@@ -39,6 +48,7 @@
'module' => 'user',
'controller' => 'bootmenu',
'action' => 'defaultbootmenu',
+ 'type' => $this->type,
'bootmenuID' => $bootmenu->getID(),
'page' => $this->page
),
@@ -47,36 +57,39 @@
<img src='/media/img/default_grey.png' alt='Not checked as default' /></a>
<?php endif; ?>
<?php endif; ?>
- <?php if(Pbs_Acl::checkRight('booe')): ?>
+ <?php if(Pbs_Acl::checkRight('booe') && $this->type == 'group'): ?>
<a href="<?php echo $this->url(
array(
'module' => 'user',
'controller' => 'bootmenu',
'action' => 'editbootmenu',
+ 'type' => $this->type,
'bootmenuID' => $bootmenu->getID(),
'page' => $this->page
),
'default',
true, false) ?>"><img src='/media/img/edit.png' alt='Edit Bootmenu'/></a>
<?php endif; ?>
- <?php if(Pbs_Acl::checkRight('bood')): ?>
+ <?php if(Pbs_Acl::checkRight('bood') && $this->type == 'group'): ?>
<a href="<?php echo $this->url(
array(
'module' => 'user',
'controller' => 'bootmenu',
'action' => 'deletebootmenu',
+ 'type' => $this->type,
'bootmenuID' => $bootmenu->getID(),
'page' => $this->page
),
'default',
true) ?>"><img src='/media/img/delete.png' alt='Delete Bootmenu'/></a>
<?php endif; ?>
- <?php if(Pbs_Acl::checkRight('booae')): ?>
+ <?php if((Pbs_Acl::checkRight('booae') && $this->type == 'group') || (Pbs_Acl::checkRight('booaeo') && $this->type == 'own')): ?>
<a href="<?php echo $this->url(
array(
'module' => 'user',
'controller' => 'bootmenu',
'action' => 'addbootmenuentry',
+ 'type' => $this->type,
'bootmenuID' => $bootmenu->getID(),
'maxorder' => count($this->bootmenuentrylist[$bootmenu->getID()]),
'page' => $this->page
@@ -97,24 +110,26 @@
<div class='number'><?php echo $k+1 ?></div>
<div class='content'>
<div class='actions'>
- <?php if(Pbs_Acl::checkRight('booai')): ?>
+ <?php if((Pbs_Acl::checkRight('booai') && $this->type == 'group') || (Pbs_Acl::checkRight('booaio') && $this->type == 'own')): ?>
<a class='play' href="<?php echo $this->url(
array(
'controller' => 'resource',
'action' => 'getbootmenuentry',
+ 'type' => $this->type,
'bootmenuentryID' => $bootmenuentry->getID(),
'page' => $this->page
),
'default',
true, false) ?>"><img src='/media/img/play.gif'></a>
<?php endif; ?>
- <?php if(Pbs_Acl::checkRight('booee') || Pbs_Acl::checkRight('booeem')): ?>
+ <?php if(((Pbs_Acl::checkRight('booee') || Pbs_Acl::checkRight('booeem')) && $this->type == 'group') || (Pbs_Acl::checkRight('booeeo') && $this->type == 'own')): ?>
<a href="<?php echo $this->url(
array(
'module' => 'user',
'controller' => 'bootmenu',
'action' => 'editbootmenuentry',
'bootmenuentryID' => $bootmenuentry->getID(),
+ 'type' => $this->type,
'maxorder' => count($this->bootmenuentrylist[$bootmenu->getID()]),
'oldorder' => $bootmenuentry->getOrder(),
'page' => $this->page
@@ -122,12 +137,13 @@
'default',
true, false) ?>"><img src='/media/img/edit.png' alt='Edit Entry'/></a>
<?php endif; ?>
- <?php if(Pbs_Acl::checkRight('boode')): ?>
+ <?php if((Pbs_Acl::checkRight('boode') && $this->type == 'group') || (Pbs_Acl::checkRight('boodeo') && $this->type == 'own')): ?>
<a href="<?php echo $this->url(
array(
'module' => 'user',
'controller' => 'bootmenu',
'action' => 'removebootmenuentry',
+ 'type' => $this->type,
'bootmenuentryID' => $bootmenuentry->getID(),
'page' => $this->page
),