summaryrefslogtreecommitdiffstats
path: root/application/modules/user/views/scripts/bootos
diff options
context:
space:
mode:
authormichael pereira2011-04-10 21:05:24 +0200
committermichael pereira2011-04-10 21:05:24 +0200
commitce62cf823e40aaf60389a28520390c9373cb3253 (patch)
treec4d027e88ea39ecf8d4f6717d7fe6d0f3cec2d4a /application/modules/user/views/scripts/bootos
parentkcl fixed (diff)
downloadpbs2-ce62cf823e40aaf60389a28520390c9373cb3253.tar.gz
pbs2-ce62cf823e40aaf60389a28520390c9373cb3253.tar.xz
pbs2-ce62cf823e40aaf60389a28520390c9373cb3253.zip
Config Own/Group getrennt
Diffstat (limited to 'application/modules/user/views/scripts/bootos')
-rw-r--r--application/modules/user/views/scripts/bootos/index.phtml115
1 files changed, 70 insertions, 45 deletions
diff --git a/application/modules/user/views/scripts/bootos/index.phtml b/application/modules/user/views/scripts/bootos/index.phtml
index 99ddfc3..d135ed3 100644
--- a/application/modules/user/views/scripts/bootos/index.phtml
+++ b/application/modules/user/views/scripts/bootos/index.phtml
@@ -1,89 +1,114 @@
<h1>BootOS</h1>
<?php if($this->notification != ''){echo $this->notification;} ?>
<?php echo $this->searchform; ?>
+
+<?php if(Pbs_Acl::checkRight('bou')): ?>
<?php echo $this->formButton('checkupdate', 'Check for Updates', array(
'onclick' => 'self.location="/user/bootos/index/page/'.$this->page.'/checkupdate/true"',
'class' => 'updatebutton',
))?>
+<?php endif;?>
+<?php if(Pbs_Acl::checkRight('boc')): ?>
<?php echo $this->formButton('createbootos', 'Create BootOS', array(
'onclick' => 'self.location="/user/bootos/createbootos/page/'.$this->page.'"',
'class' => 'addbutton'))?>
-
+<?php endif;?>
<div class='searchvars'>
<div class='head'>Available searchfilter:</div>
- <div class='code'>bootosID</div>
+ <?php if(Pbs_Acl::checkRight('boai')): ?>
+ <div class='code'>bootosID</div>
+ <div class='code'>public</div>
+ <div class='code'>kernel</div>
+ <div class='code'>kcl</div>
+ <div class='code'>init</div>
+ <?php endif; ?>
+
<div class='code'>title</div>
<div class='code'>groupID</div>
<div class='code'>configID</div>
- <div class='code'>init</div>
- <div class='code'>kernel</div>
- <div class='code'>kcl</div>
<div class='code'>description</div>
- <div class='code'>changed</div>
+ <div class='code'>created</div>
<div class='code'>expires</div>
- <div class='code'>public</div>
</div>
<div class='listelement'>
<?php if(count($this->bootoslist)==0)
echo "There are no BootOs's to display." ?>
- <?php foreach ($this->bootoslist as $bootos): ?>
+ <?php foreach ($this->bootoslist as $k => $bootos): ?>
<div class='element'>
- <div class='number'><?php echo $this->escape($bootos->getID()); ?></div>
+ <div class='number'><?php echo $k+1 ?></div>
<div class='content'>
<div class='actions'>
- <?php if($this->update[$bootos->getID()]==true): ?>
- <a href="<?php echo $this->url(
+ <?php if(Pbs_Acl::checkRight('bou')): ?>
+ <?php if($this->update[$bootos->getID()]==true): ?>
+ <a href="<?php echo $this->url(
+ array(
+ 'module' => 'user',
+ 'controller' => 'bootos',
+ 'action' => 'updatebootos',
+ 'bootosID' => $bootos->getID(),
+ 'page' => $this->page
+ ),
+ 'default',
+ true, false) ?>"><img src='/media/img/update.png' alt='Updates available' /></a></td>
+ <?php else: ?>
+ <a><img src='/media/img/update_grey.png' alt='No updates available' /></a>
+ <?php endif; ?>
+ <?php endif; ?>
+ <?php if(Pbs_Acl::checkRight('boe') || Pbs_Acl::checkRight('boem')): ?>
+ <a href="<?php echo $this->url(
+ array(
+ 'module' => 'user',
+ 'controller' => 'bootos',
+ 'action' => 'editbootos',
+ 'bootosID' => $bootos->getID(),
+ 'page' => $this->page
+ ),
+ 'default',
+ true, false) ?>"><img src='/media/img/edit.png' alt='Edit BootOS' /></a>
+ <?php endif; ?>
+ <?php if(Pbs_Acl::checkRight('bod')): ?>
+ <a href="<?php echo $this->url(
array(
'module' => 'user',
'controller' => 'bootos',
- 'action' => 'updatebootos',
+ 'action' => 'deletebootos',
'bootosID' => $bootos->getID(),
'page' => $this->page
),
'default',
- true, false) ?>"><img src='/media/img/update.png' alt='Updates available' /></a></td>
- <?php else: ?>
- <a><img src='/media/img/update_grey.png' alt='No updates available' /></a>
- <?php endif; ?>
- <a href="<?php echo $this->url(
- array(
- 'module' => 'user',
- 'controller' => 'bootos',
- 'action' => 'editbootos',
- 'bootosID' => $bootos->getID(),
- 'page' => $this->page
- ),
- 'default',
- true, false) ?>"><img src='/media/img/edit.png' alt='Edit BootOS' /></a>
- <a href="<?php echo $this->url(
- array(
- 'module' => 'user',
- 'controller' => 'bootos',
- 'action' => 'deletebootos',
- 'bootosID' => $bootos->getID(),
- 'page' => $this->page
- ),
- 'default',
- true) ?>"><img src='/media/img/delete.png' alt='Delete BootOS' /></a>
+ true) ?>"><img src='/media/img/delete.png' alt='Delete BootOS' /></a>
+ <?php endif; ?>
</div>
+ <?php if(!Pbs_Acl::checkRight('boai')){
+ $bootos->setConfigID(preg_replace("!^\[[0-9]+\]\s!",'',$bootos->getConfigID()));
+ $bootos->setGroupID(preg_replace("!^\[[0-9]+\]\s!",'',$bootos->getGroupID()));
+ } ?>
<div class='title'><?php echo $this->escape($bootos->getTitle()); ?></div>
<div class='subtitle'><?php echo $this->escape($bootos->getGroupID()); ?> - <?php echo $this->escape($bootos->getDescription()); ?></div>
<div class='details dispnone'>
+ <?php if(Pbs_Acl::checkRight('boai')): ?>
+ <label>BootosID</label>
+ <div class='item'><?php echo $this->escape($bootos->getID()); ?></div>
+ <?php endif; ?>
<label>ConfigID</label>
<div class='item'><?php echo $this->escape($bootos->getConfigID()); ?></div>
- <label>initPath</label>
- <div class='item'><?php echo $this->escape($bootos->getPath_init()); ?></div>
- <label>kernelPath</label>
- <div class='item'><?php echo $this->escape($bootos->getPath_kernel()); ?></div>
- <label>Default KCL</label>
- <div class='item'><?php echo $this->escape($bootos->getDefaultkcl()); ?></div>
- <label>Created</label>
+ <?php if(Pbs_Acl::checkRight('boai')): ?>
+ <label>initPath</label>
+ <div class='item'><?php echo $this->escape($bootos->getPath_init()); ?></div>
+ <label>kernelPath</label>
+ <div class='item'><?php echo $this->escape($bootos->getPath_kernel()); ?></div>
+ <label>Default KCL</label>
+ <div class='item'><?php echo $this->escape($bootos->getDefaultkcl()); ?></div>
+ <?php endif; ?>
+ <label>Changed</label>
<div class='item'><?php echo $this->escape($bootos->getCreated()); ?></div>
<label>Expires</label>
<div class='item'><?php echo $this->escape($bootos->getExpires()); ?></div>
- <label>Public</label>
- <div class='item'><?php echo $this->escape($bootos->getPublic()); ?></div>
+ <?php if(Pbs_Acl::checkRight('boai')): ?>
+ <label>Public</label>
+ <div class='item'><?php echo $this->escape($bootos->getPublic()); ?></div>
+ <?php endif; ?>
</div>
</div>