diff options
| author | Simon | 2011-04-08 18:33:34 +0200 |
|---|---|---|
| committer | Simon | 2011-04-08 18:33:34 +0200 |
| commit | f32dbe7ad95257387a5f4c70ff0b3eb846f4a4e5 (patch) | |
| tree | 6e43b8bf9791f2d374208ab22fefdfbf86039d5f /application | |
| parent | Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff) | |
| download | pbs2-f32dbe7ad95257387a5f4c70ff0b3eb846f4a4e5.tar.gz pbs2-f32dbe7ad95257387a5f4c70ff0b3eb846f4a4e5.tar.xz pbs2-f32dbe7ad95257387a5f4c70ff0b3eb846f4a4e5.zip | |
Pool & Client - Je nach Rechten unterschiedliche Anzeigen
Diffstat (limited to 'application')
3 files changed, 24 insertions, 7 deletions
diff --git a/application/modules/user/controllers/PoolController.php b/application/modules/user/controllers/PoolController.php index 87f330a..942f988 100644 --- a/application/modules/user/controllers/PoolController.php +++ b/application/modules/user/controllers/PoolController.php @@ -132,10 +132,10 @@ class User_PoolController extends Zend_Controller_Action $pool->setGroupID($this->membership->getGroupID()); $poolmapper = new Application_Model_PoolMapper(); $poolmapper->save($pool); - $this->_redirect('/dev/pool/index/addresult/ok'); + $this->_redirect('/user/pool/index/addresult/ok'); }catch (Zend_Exception $e) { echo "Error message 2: " . $e->getMessage() . "\n"; - $this->_redirect('/dev/pool/index/addresult/error'); + $this->_redirect('/user/pool/index/addresult/error'); } } $this->view->addpool = $addpoolform; diff --git a/application/modules/user/views/scripts/client/index.phtml b/application/modules/user/views/scripts/client/index.phtml index 7cdc03d..0d6145c 100644 --- a/application/modules/user/views/scripts/client/index.phtml +++ b/application/modules/user/views/scripts/client/index.phtml @@ -1,9 +1,11 @@ <h1>Clients</h1> <?php if($this->notification != ''){echo $this->notification;} ?> <?php echo $this->searchform; ?> +<?php if(Pbs_Acl::checkRight('cla')): ?> <?php echo $this->formButton('createbootos', 'Create Client', array( 'onclick' => 'self.location="/user/client/addclient/page/'.$this->page.'"', 'class' => 'addbutton'))?> +<?php endif;?> <div class='searchvars'> <div class='head'>Available searchfilter:</div> <div class='code'>clientID</div> @@ -19,6 +21,7 @@ <div class='number'><?php echo $this->escape($client['clientID']) ?></div> <div class='content'> <div class='actions'> + <?php if(Pbs_Acl::checkRight('cle')): ?> <a href="<?php echo $this->url( array( 'module' => 'user', @@ -29,6 +32,8 @@ ), 'default', true) ?>"><img src='/media/img/edit.png' alt='Edit Client'/></a> + <?php endif; ?> + <?php if(Pbs_Acl::checkRight('cld')): ?> <a href="<?php echo $this->url( array( 'module' => 'user', @@ -39,6 +44,7 @@ ), 'default', true) ?>"><img src='/media/img/delete.png' alt='Delete Client'/></a> + <?php endif; ?> </div> <!--<div class='title'>Title</div>--> <!--<div class='subtitle'>Subtitle</div>--> diff --git a/application/modules/user/views/scripts/pool/index.phtml b/application/modules/user/views/scripts/pool/index.phtml index 7d5a6cc..fbdb8f8 100644 --- a/application/modules/user/views/scripts/pool/index.phtml +++ b/application/modules/user/views/scripts/pool/index.phtml @@ -1,10 +1,11 @@ <h1>Pools</h1> <?php if($this->notification != ''){echo $this->notification;} ?> <?php echo $this->searchform; ?> +<?php if(Pbs_Acl::checkRight('poc')): ?> <?php echo $this->formButton('createconfig', 'Create Pool', array( 'onclick' => 'self.location="/user/pool/createpool/page/'.$this->page.'"', 'class' => 'addbutton'))?> - +<?php endif;?> <div class='searchvars'> <div class='head'>Available searchfilter:</div> <div class='code'>bootosID</div> @@ -28,6 +29,7 @@ <div class='number'><?php echo $this->escape($pool->getID()) ?></div> <div class='content'> <div class='actions'> + <?php if(Pbs_Acl::checkRight('poe')): ?> <a href="<?php echo $this->url( array( 'module' => 'user', @@ -38,6 +40,8 @@ ), 'default', true) ?>"><img src='/media/img/edit.png' alt='Edit Pool'/></a> + <?php endif;?> + <?php if(Pbs_Acl::checkRight('pod')): ?> <a href="<?php echo $this->url( array( 'module' => 'user', @@ -48,6 +52,8 @@ ), 'default', true) ?>"><img src='/media/img/delete.png' alt='Delete Pool'/></a> + <?php endif;?> + <?php if(Pbs_Acl::checkRight('polc')): ?> <a href="<?php echo $this->url( array( 'module' => 'user', @@ -58,6 +64,7 @@ ), 'default', true) ?>"><img src='/media/img/add.png' alt='Link Client'/></a> + <?php endif;?> </div> <?php $poolentriesMapper = new Application_Model_PoolEntriesMapper(); @@ -80,6 +87,7 @@ <div class='number'><?php echo $client['clientID'];?></div> <div class='content'> <div class='actions'> + <?php if(Pbs_Acl::checkRight('pouc')):?> <a href="<?php echo $this->url( array( 'module' => 'user', @@ -90,6 +98,7 @@ ), 'default', true) ?>"><img src='/media/img/delete.png' alt='Unlink Client'/></a> + <?php endif;?> </div> <div class='details'> <label>MacAdress</label> @@ -101,8 +110,8 @@ <div class='clear'></div> </div> <?php endforeach ?> - </div> - <?php endif;?> + <?php endif;?> + </div> </div> <div class='clear'></div> </div> @@ -111,14 +120,14 @@ <?php echo $this->pagination; ?> -<?php if (isset($this->freeclients) && count($this->freeclients)>0): ?> +<?php if (isset($this->freeclients) && count($this->freeclients)>0 && Pbs_Acl::checkRight('posuc')): ?> <h2 style='margin-top:20px;'>Free clients</h2> <p style="text-align:right;"> <span style="font-weight:bold;">Search:</span> <input type="text" id="txtSearch" name="txtSearch" maxlength="50" /> <img id="imgSearch" src="/media/img/delete.png" alt="Cancel Search" title="Cancel Search" style="width:150px;width:14px;height:14px;" /> </p> -<div style="height: 200px; overflow: scroll; overflow-x: hidden; "> +<div style="height: 200px; overflow: scroll; overflow-x: hidden;padding-right:5px;"> <div class='listelement' id='tblSearch'> <?php foreach ($this->freeclients as $client): ?> @@ -126,6 +135,7 @@ <div class='number'>5</div> <div class='content'> <div class='actions'> + <?php if(Pbs_Acl::checkRight('polc')):?> <select onChange="location.href=this.options[this.selectedIndex].value"> <option></option> <?php foreach ($this->pools as $pool): ?> @@ -143,6 +153,7 @@ <?php //<img src='/media/img/add.png' alt='Link to Pool'/></a></td> ?> <?php endforeach ?> </select> + <?php endif;?> </div> <div class='details'> <label>MacAdress</label> |
