summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorSimon2011-04-13 16:35:49 +0200
committerSimon2011-04-13 16:35:49 +0200
commitb306697b1e9a549a7a06e0b14dc3f62e14913dd4 (patch)
tree9d883726abf707e73651ce1a2692ac8bbd48df55 /application
parentBei Details anderer Personen gleiches Layout wie bei OwnDetails (diff)
downloadpbs2-b306697b1e9a549a7a06e0b14dc3f62e14913dd4.tar.gz
pbs2-b306697b1e9a549a7a06e0b14dc3f62e14913dd4.tar.xz
pbs2-b306697b1e9a549a7a06e0b14dc3f62e14913dd4.zip
Rechte in Gruppen nächster Teil
Diffstat (limited to 'application')
-rw-r--r--application/controllers/StatsController.php8
-rw-r--r--application/modules/user/views/scripts/group/show.phtml11
-rw-r--r--application/modules/user/views/scripts/index/index.phtml5
-rw-r--r--application/modules/user/views/scripts/role/linkright.phtml6
4 files changed, 23 insertions, 7 deletions
diff --git a/application/controllers/StatsController.php b/application/controllers/StatsController.php
index 8fc718e..74eb2db 100644
--- a/application/controllers/StatsController.php
+++ b/application/controllers/StatsController.php
@@ -22,8 +22,14 @@ class StatsController extends Zend_Controller_Action
if(is_numeric($level) && $level != ''){
$n->setHiglightLevel($level);
}
+ $groupID = $userIDsNamespace['groupID'];
- echo $n->graph($userIDsNamespace['groupID']);
+ $group = $this->_request->getParam('group');
+ if((Pbs_Acl::checkRight('gsdo') || Pbs_Acl::checkRight('gsdog')) && is_numeric($group)){
+ $groupID = $group;
+ }
+
+ echo $n->graph($groupID);
}
}
}
diff --git a/application/modules/user/views/scripts/group/show.phtml b/application/modules/user/views/scripts/group/show.phtml
index b01ade4..042b34e 100644
--- a/application/modules/user/views/scripts/group/show.phtml
+++ b/application/modules/user/views/scripts/group/show.phtml
@@ -1,20 +1,28 @@
<h1>Groupdetails - <?php echo $this->group->getTitle();?></h1>
<?php
if($this->usergroup == $this->requestgroup){
+ if(Pbs_Acl::checkRight('gd')){
echo $this->formButton('deletegroup', 'Delete', array(
'onclick' => 'self.location="/user/group/delete/"',
'class' => 'rightbutton'));
+ }
+ if(Pbs_Acl::checkRight('geo')){
echo $this->formButton('editgroup', 'Edit', array(
'onclick' => 'self.location="/user/group/edit/"',
'class' => 'rightbutton'));
+ }
}
else{
+ if(Pbs_Acl::checkRight('gd')){
echo $this->formButton('deletegroup', 'Delete', array(
'onclick' => 'self.location="/user/group/delete/groupID/' . $this->group->getID() .'"',
'class' => 'rightbutton'));
+ }
+ if(Pbs_Acl::checkRight('geo')){
echo $this->formButton('editgroup', 'Edit', array(
'onclick' => 'self.location="/user/group/edit/groupID/' . $this->group->getID() .'"',
'class' => 'rightbutton'));
+ }
}
?>
<div class='listelement'>
@@ -36,6 +44,9 @@ if($this->usergroup == $this->requestgroup){ ?>
<div class='clear'></div>
</div>
</div>
+<div class='bottomimg'>
+ <img src='/stats/graphgroup/group/<?php echo $this->group->getID();?>' />
+ </div>
<?php
diff --git a/application/modules/user/views/scripts/index/index.phtml b/application/modules/user/views/scripts/index/index.phtml
index aa98393..f00d0dd 100644
--- a/application/modules/user/views/scripts/index/index.phtml
+++ b/application/modules/user/views/scripts/index/index.phtml
@@ -7,10 +7,7 @@
<?php foreach($this->links as $link => $text):?>
<a href='<?php echo $link;?>'><li><?php echo $text;?></li></a>
<?php endforeach ?>
- </ul>
- <div class='bottomimg'>
- <img src='/stats/graphgroup/' />
- </div>
+ </ul>
</div>
<?php endif ?>
diff --git a/application/modules/user/views/scripts/role/linkright.phtml b/application/modules/user/views/scripts/role/linkright.phtml
index f7c1133..06863d4 100644
--- a/application/modules/user/views/scripts/role/linkright.phtml
+++ b/application/modules/user/views/scripts/role/linkright.phtml
@@ -9,8 +9,10 @@ $(document).ready(function(){
$('fieldset').children('dl:gt(0)').hide();
$('fieldset fieldset>legend').css('cursor','pointer');
$('fieldset fieldset').click(
- function(){
- $(this).children('dl').slideToggle();
+ function(e){
+ if($(e.target).context.nodeName == "LEGEND"){
+ $(this).children('dl').slideToggle();
+ }
});
});