summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Geiger2011-04-08 10:25:29 +0200
committerBjörn Geiger2011-04-08 10:25:29 +0200
commite30767a8f83df955fec83d2a2e459a5a8f18193f (patch)
treeb6d6e169d2c60c1ee78e278c45d371cc70b888bf
parentdefaultbootmenu fertig (diff)
downloadpbs2-e30767a8f83df955fec83d2a2e459a5a8f18193f.tar.gz
pbs2-e30767a8f83df955fec83d2a2e459a5a8f18193f.tar.xz
pbs2-e30767a8f83df955fec83d2a2e459a5a8f18193f.zip
Eigener Menüpunkt für Person- und Grouplist
-rw-r--r--application/modules/user/controllers/PersonController.php2
-rw-r--r--application/modules/user/layouts/user.phtml14
-rw-r--r--application/modules/user/views/scripts/group/show.phtml55
-rw-r--r--application/modules/user/views/scripts/person/index.phtml48
-rw-r--r--application/modules/user/views/scripts/person/show.phtml3
-rw-r--r--public/media/js/script.js14
6 files changed, 62 insertions, 74 deletions
diff --git a/application/modules/user/controllers/PersonController.php b/application/modules/user/controllers/PersonController.php
index c1e76d3..ff5517c 100644
--- a/application/modules/user/controllers/PersonController.php
+++ b/application/modules/user/controllers/PersonController.php
@@ -63,7 +63,6 @@ class user_PersonController extends Zend_Controller_Action
$this->view->groupRequestRight = Pbs_Acl::checkRight('grm');
$this->view->editRight = Pbs_Acl::checkRight('peoa');
$this->view->leaveRight = Pbs_Acl::checkRight('gl');
- $this->view->overviewRight = Pbs_Acl::checkRight('pso');
$this->view->userIDsNamespace = Zend_Session::namespaceGet('userIDs');
}
@@ -340,7 +339,6 @@ class user_PersonController extends Zend_Controller_Action
$this->view->personID = $personID;
$this->view->editRight = Pbs_Acl::checkRight('peoa');
$this->view->deleteRight = Pbs_Acl::checkRight('pd');
- $this->view->overviewRight = Pbs_Acl::checkRight('pso');
$this->view->userIDsNamespace = Zend_Session::namespaceGet('userIDs');
} else {
$this->_helper->redirector('', 'person');
diff --git a/application/modules/user/layouts/user.phtml b/application/modules/user/layouts/user.phtml
index 2fbdabf..edbe209 100644
--- a/application/modules/user/layouts/user.phtml
+++ b/application/modules/user/layouts/user.phtml
@@ -25,17 +25,21 @@ echo $this->headScript()."\n";
</div>
<div id="sidepannel-top" class='portletNavigationTree'>
<ul class='navTreeLevel0'>
- <li class='navTreeItem'><a href='/'><<</a></li>
+ <li class='navTreeItem'><a href='/'>&lt;&lt;</a></li>
<li class='navTreeItem'><a href='/user/'>user</a></li>
<li>
<ul class='navTreeLevel1'>
<?php if (Zend_Auth::getInstance()->hasIdentity() && count(Zend_Session::namespaceGet('userIDs')) > 0) {
# This should be splitted
- if(Pbs_Acl::checkRight('pso') || Pbs_Acl::checkRight('psod'))
- echo "<li class='navTreeItem'><a href='/user/person'>Person</a></li>";
+ 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'))
+ echo "<li class='navTreeItem'><a href='/user/group'>Own Group</a></li>";
if(Pbs_Acl::checkRight('gso'))
- echo "<li class='navTreeItem'><a href='/user/group'>Group</a></li>";
- if(Pbs_Acl::checkRight('ro'))
+ echo "<li class='navTreeItem'><a href='/user/group/showall'>Grouplist</a></li>";
+ if(Pbs_Acl::checkRight('ro'))
echo "<li class='navTreeItem'><a href='/user/role'>Role</a></li>";
if(Pbs_Acl::checkRight('bai') || Pbs_Acl::checkRight('bui'))
echo "<li class='navTreeItem'><a href='/user/bootiso'>BootIso</a></li>";
diff --git a/application/modules/user/views/scripts/group/show.phtml b/application/modules/user/views/scripts/group/show.phtml
index a1c0896..ea677ac 100644
--- a/application/modules/user/views/scripts/group/show.phtml
+++ b/application/modules/user/views/scripts/group/show.phtml
@@ -44,9 +44,6 @@ if($this->groupID) {
?>
</table>
<?php
- echo $this->formButton('editgroup', 'Show Grouplist', array(
- 'onclick' => 'self.location="/user/group/showall"',
- 'class' => 'rightbutton'));
if(isset($this->groupRequestList)) {
?>
<br />
@@ -87,19 +84,17 @@ if($this->groupID) {
?>
<br />
<h2>Members:</h2>
-<div class='listelement'>
- <?php if(count($this->membersList)==0)
- echo "This hroup has no members." ?>
- <?php foreach ($this->membersList as $member): ?>
- <?php
- $membershipID = $member['membershipID'];
- $person = $member['person'];
- $role = $member['role'];
- ?>
- <div class='element'>
- <div class='content'>
- <div class='actions'>
- <a href="<?php echo $this->url(
+<div class='listelement'><?php if(count($this->membersList)==0)
+echo "This hroup has no members." ?> <?php foreach ($this->membersList as $member): ?>
+<?php
+$membershipID = $member['membershipID'];
+$person = $member['person'];
+$role = $member['role'];
+?>
+<div class='element'>
+<div class='content'>
+<div class='actions'><a
+ href="<?php echo $this->url(
array(
'module' => 'user',
'controller' => 'group',
@@ -108,23 +103,21 @@ if($this->groupID) {
),
'default',
true) ?>"> <img src='/media/img/delete.png' alt='Revoke Membership' /></a>
- </div>
- <div class='title'><?php echo $person->getFirstname(); ?> <?php echo $person->getName(); ?></div>
- <div class='subtitle'>Role: <?php echo $role->getTitle(); ?></div>
- <div class='details dispnone'>
- <label>Email</label>
- <div class='item'><?php echo $person->getEmail(); ?></div>
- <label>City</label>
- <div class='item'><?php echo $person->getCity(); ?></div>
- </div>
- </div>
- <div class='clear'></div>
- </div>
- <?php endforeach ?>
</div>
+<div class='title'><?php echo $person->getFirstname(); ?> <?php echo $person->getName(); ?></div>
+<div class='subtitle'>Role: <?php echo $role->getTitle(); ?></div>
+<div class='details dispnone'><label>Email</label>
+<div class='item'><?php echo $person->getEmail(); ?></div>
+<label>City</label>
+<div class='item'><?php echo $person->getCity(); ?></div>
+</div>
+</div>
+<div class='clear'></div>
+</div>
+ <?php endforeach ?></div>
- <?php echo $this->memberPagination; ?>
- <?php
+ <?php echo $this->memberPagination; ?>
+ <?php
}
}
diff --git a/application/modules/user/views/scripts/person/index.phtml b/application/modules/user/views/scripts/person/index.phtml
index a4d3a3d..7c6fc8d 100644
--- a/application/modules/user/views/scripts/person/index.phtml
+++ b/application/modules/user/views/scripts/person/index.phtml
@@ -15,28 +15,22 @@
<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($this->overviewRight === true) echo $this->formButton('showallperson', 'Show Personlist', array(
- 'onclick' => 'self.location="/user/person/showall/"',
- 'class' => 'rightbutton'));
if(isset($this->groups)) {
?>
<br />
<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
- $class='';
- if($group['membershipID'] == $this->userIDsNamespace['membershipID'])
- $class= 'highlight checked';
- ?>
- <div class='element<?php echo " $class";?>'>
- <div class='content'>
- <div class='actions'>
- <?php if($this->leaveRight === true): ?>
- <a href="<?php echo $this->url(
+<div class='listelement'><?php if(count($this->groups)==0)
+echo "You are in no group." ?> <?php foreach ($this->groups as $group): ?>
+<?php
+$class='';
+if($group['membershipID'] == $this->userIDsNamespace['membershipID'])
+$class= 'highlight checked';
+?>
+<div class='element<?php echo " $class";?>'>
+<div class='content'>
+<div class='actions'><?php if($this->leaveRight === true): ?> <a
+ href="<?php echo $this->url(
array(
'module' => 'user',
'controller' => 'person',
@@ -44,18 +38,16 @@ if(isset($this->groups)) {
'membershipID' => $group['membershipID']
),
'default',
- true) ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a>
- <?php endif; ?>
- </div>
- <div class='title'><?php echo $group['title']; ?></div>
- <div class='subtitle'><?php echo $group['description']; ?></div>
- </div>
- <div class='clear'></div>
- </div>
- <?php endforeach ?>
+ true) ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a>
+ <?php endif; ?></div>
+<div class='title'><?php echo $group['title']; ?></div>
+<div class='subtitle'><?php echo $group['description']; ?></div>
+</div>
+<div class='clear'></div>
</div>
- <?php echo $this->pagination;
- if($this->groupRequestRight === true) echo $this->formButton('addtogroup', 'Add to additional
+ <?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'));
diff --git a/application/modules/user/views/scripts/person/show.phtml b/application/modules/user/views/scripts/person/show.phtml
index be973b9..8ebb371 100644
--- a/application/modules/user/views/scripts/person/show.phtml
+++ b/application/modules/user/views/scripts/person/show.phtml
@@ -18,9 +18,6 @@
<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($this->overviewRight === true) echo $this->formButton('showallperson', 'Show Personlist', array(
- 'onclick' => 'self.location="/user/person/showall/"',
- 'class' => 'rightbutton'));
if(isset($this->groups)) {
?>
<br />
diff --git a/public/media/js/script.js b/public/media/js/script.js
index 7b6c2cd..546e1f6 100644
--- a/public/media/js/script.js
+++ b/public/media/js/script.js
@@ -1,9 +1,13 @@
-$(document).ready(function(){
+$(document).ready(function() {
path = window.location.pathname.split('/');
- mypath= '/'+path[1]+'/'+path[2];
- $('.portletNavigationTree a').each(function(){
- if($(this).attr('href') == mypath){
- /*console.log($(this).parent());*/
+ if (path[3] == 'showall') {
+ mypath = '/' + path[1] + '/' + path[2] + '/' + path[3];
+ } else {
+ mypath = '/' + path[1] + '/' + path[2];
+ }
+ $('.portletNavigationTree a').each(function() {
+ if ($(this).attr('href') == mypath) {
+ /* console.log($(this).parent()); */
$(this).addClass('navTreeCurrentNode');
$(this).addClass('navTreeCurrentItem');
}