summaryrefslogtreecommitdiffstats
path: root/application/modules/user/views/scripts
diff options
context:
space:
mode:
authormichael pereira2011-04-13 15:31:33 +0200
committermichael pereira2011-04-13 15:31:33 +0200
commitc8aae2da451be228d8059af6bb6603985fbac212 (patch)
treed711c0803bfda886ce07afb001f014f2492b8a11 /application/modules/user/views/scripts
parentUser login + homeverzeichnis in config (diff)
parentMerge branch 'master' of ssh://git.openslx.org/lsfks/master-teamprojekt/pbs2 (diff)
downloadpbs2-c8aae2da451be228d8059af6bb6603985fbac212.tar.gz
pbs2-c8aae2da451be228d8059af6bb6603985fbac212.tar.xz
pbs2-c8aae2da451be228d8059af6bb6603985fbac212.zip
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application/modules/user/views/scripts')
-rw-r--r--application/modules/user/views/scripts/group/index.phtml79
-rw-r--r--application/modules/user/views/scripts/group/show.phtml60
-rw-r--r--application/modules/user/views/scripts/person/index.phtml39
-rw-r--r--application/modules/user/views/scripts/person/owndetails.phtml48
-rw-r--r--application/modules/user/views/scripts/person/show.phtml29
5 files changed, 163 insertions, 92 deletions
diff --git a/application/modules/user/views/scripts/group/index.phtml b/application/modules/user/views/scripts/group/index.phtml
index 2e376b3..e3b5082 100644
--- a/application/modules/user/views/scripts/group/index.phtml
+++ b/application/modules/user/views/scripts/group/index.phtml
@@ -6,31 +6,34 @@
?>
<div class='searchvars'>
-<div class='head'>Available searchfilter:</div>
-<div class='code'>title</div>
-<div class='code'>description</div>
+ <div class='head'>Available searchfilter:</div>
+ <div class='code'>title</div>
+ <div class='code'>description</div>
</div>
-<div class='listelement'><?php
+<div class='listelement'>
+<?php
if(count($this->groupList)==0)
-echo "There are no groups" ?> <?php foreach ($this->groupList as $k => $group): ?>
+echo "There are no groups" ?>
+<?php foreach ($this->groupList as $k => $group): ?>
<?php
$class='';
if($group->getID() == $this->userIDsNamespace['groupID'])
$class= 'highlight checked';
?>
-<div class='element<?php echo " $class";?>'><?php if($group->getID() != $this->userIDsNamespace['groupID']) {
+ <div class='element<?php echo " $class";?>'>
+ <?php if($group->getID() != $this->userIDsNamespace['groupID']) {
+ ?>
+ <div class='number'>
+ <div class='smallnumber'>Group</div>
+ <?php echo $k+1; ?>
+ </div>
+ <?php
+ }
?>
-<div class='number'>
- <div class='smallnumber'>Group</div>
- <?php echo $k+1; ?>
-</div>
- <?php
-}
-?>
-<div class='content'>
-<div class='actions'><a
- href="<?php if($group->getID() == $this->userIDsNamespace['groupID']) echo $this->url(
+ <div class='content'>
+ <div class='actions'>
+ <a href="<?php if($group->getID() == $this->userIDsNamespace['groupID']) echo $this->url(
array(
'module' => 'user',
'controller' => 'group',
@@ -45,9 +48,8 @@ $class= 'highlight checked';
'groupID' => $group->getID()
),
'default',
- true); ?>"> <img src='/media/img/show.png' alt='Show Group' /></a>
-<a
- href="<?php if($group->getID() == $this->userIDsNamespace['groupID']) echo $this->url(
+ true); ?>"> <img src='/media/img/show.png' alt='Show Group' /> </a>
+ <a href="<?php if($group->getID() == $this->userIDsNamespace['groupID']) echo $this->url(
array(
'module' => 'user',
'controller' => 'group',
@@ -62,9 +64,8 @@ $class= 'highlight checked';
'groupID' => $group->getID()
),
'default',
- true); ?>"> <img src='/media/img/edit.png' alt='Edit Group' /></a>
-<a
- href="<?php if($group->getID() == $this->userIDsNamespace['groupID']) echo $this->url(
+ true); ?>"> <img src='/media/img/edit.png' alt='Edit Group' /> </a>
+ <a href="<?php if($group->getID() == $this->userIDsNamespace['groupID']) echo $this->url(
array(
'module' => 'user',
'controller' => 'group',
@@ -80,24 +81,26 @@ $class= 'highlight checked';
),
'default',
true); ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a>
+ </div>
+ <div class='title'><?php echo $group->getTitle(); ?></div>
+ <?php if($group->getDescription()) {
+ ?>
+ <div class='subtitle'><?php echo $group->getDescription(); ?></div>
+ <?php
+ } else {
+ ?>
+ <div class='subtitle'>&nbsp;</div>
+ <?php
+ }
+ ?>
+ </div>
+ <div class='clear'></div>
+ </div>
+ <?php endforeach ?>
</div>
-<div class='title'><?php echo $group->getTitle(); ?></div>
- <?php if($group->getDescription()) {
- ?>
-<div class='subtitle'><?php echo $group->getDescription(); ?></div>
- <?php
- } else {
- ?>
-<div class='subtitle'>&nbsp;</div>
- <?php
- }
- ?></div>
-<div class='clear'></div>
-</div>
-<?php endforeach ?></div>
-<?php echo $this->pagination; ?>
+ <?php echo $this->pagination; ?>
-<?php echo $this->formButton('linkgroups', 'Link Groups', array(
+ <?php echo $this->formButton('linkgroups', 'Link Groups', array(
'onclick' => 'self.location="/user/group/link"',
'class' => 'addbutton'))
?>
diff --git a/application/modules/user/views/scripts/group/show.phtml b/application/modules/user/views/scripts/group/show.phtml
index f1a14d1..b2a85ac 100644
--- a/application/modules/user/views/scripts/group/show.phtml
+++ b/application/modules/user/views/scripts/group/show.phtml
@@ -1,31 +1,32 @@
-<?php
-if($this->groupID) {
- if(isset($this->userIDsNamespace['groupID'])) {
- ?>
-<h1>Own Group</h1>
- <?php
- echo $this->formButton('deletegroup', 'Delete', array(
+<h1>Groupdetails - <?php echo $this->group->getTitle();?></h1>
+<?php
+if($this->usergroup == $this->requestgroup){
+ echo $this->formButton('deletegroup', 'Delete', array(
'onclick' => 'self.location="/user/group/delete/"',
'class' => 'rightbutton'));
- echo $this->formButton('editgroup', 'Edit', array(
+ echo $this->formButton('editgroup', 'Edit', array(
'onclick' => 'self.location="/user/group/edit/"',
'class' => 'rightbutton'));
- } else {
- ?>
-<h1>Group Details</h1>
- <?php
- echo $this->formButton('deletegroup', 'Delete', array(
+}
+else{
+ echo $this->formButton('deletegroup', 'Delete', array(
'onclick' => 'self.location="/user/group/delete/groupID/' . $this->group->getID() .'"',
'class' => 'rightbutton'));
- echo $this->formButton('editgroup', 'Edit', array(
+ echo $this->formButton('editgroup', 'Edit', array(
'onclick' => 'self.location="/user/group/edit/groupID/' . $this->group->getID() .'"',
'class' => 'rightbutton'));
- }
- ?>
+}
+?>
<div class='listelement'>
<div class='element'>
<div class='number'>
- <div class='smallnumber'>Your Group</div>
+ <?php
+ if($this->usergroup == $this->requestgroup){ ?>
+ <div class='smallnumber'>Your Group</div>
+ <?php }else{ ?>
+ <div class='smallnumber'>Group</div>
+ <?php echo $this->group->getID(); ?>
+ <?php } ?>
</div>
<div class='content'>
<div class='title'><?php echo $this->group->getTitle(); ?></div>
@@ -40,7 +41,7 @@ if($this->groupID) {
</div>
</div>
<?php
-}
+
// Show Request List
if(isset($this->groupRequestList)){
@@ -55,12 +56,23 @@ if(isset($this->groupRequestList)){
?>
<div class='element'>
<div class='content'>
+ <?php
+ if($this->usergroup == $this->requestgroup && (Pbs_Acl::checkRight('gam') || Pbs_Acl::checkRight('gdm'))){
+ ?>
<div class='actions'>
+ <?php if(Pbs_Acl::checkRight('gam')): ?>
<form action="/user/group/grantperson" method="post">
<input type="hidden" name="grouprequestID" value="<?php echo $grouprequestID; ?>" /> <?php printRoleSelect($this->roleList); ?>
<input type="image" src='/media/img/save.png' alt='Grant Person' name="confirm" value="confirm" />
</form>
+ <?php endif; ?>
+ <?php if(Pbs_Acl::checkRight('gdm')): ?>
+ TODO
+ <?php endif; ?>
</div>
+ <?php
+ }
+ ?>
<div class='title'><?php echo $person->getTitle(); ?>&nbsp;<?php echo $person->getFirstname(); ?>&nbsp;<?php echo $person->getName(); ?></div>
<div class='subtitle'><?php echo $person->getCity(); ?></div>
<div class='details dispnone'>
@@ -69,12 +81,14 @@ if(isset($this->groupRequestList)){
</div>
</div>
</div>
- <?php } ?>
+ <?php
+ }
+ ?>
</div>
<?php
}
// Show Memberlist
-if(isset($this->membersList)){
+if(isset($this->membersList) && Pbs_Acl::checkRight('gsmg')){
?>
<br />
<h2>Members:</h2>
@@ -105,6 +119,9 @@ if(count($this->membersList)==0)
?>
<div class='content'>
<div class='actions'>
+ <?php
+ if((Pbs_Acl::checkRight('gdmo') && $this->usergroup == $this->requestgroup) || (Pbs_Acl::checkRight('gdmog') && $this->usergroup != $this->requestgroup)):
+ ?>
<a href="<?php echo $this->url(
array(
'module' => 'user',
@@ -114,6 +131,9 @@ if(count($this->membersList)==0)
),
'default',
true) ?>"> <img src='/media/img/delete.png' alt='Revoke Membership' /></a>
+ <?php
+ endif;
+ ?>
</div>
<div class='title'><?php echo $person->getFirstname(); ?> <?php echo $person->getName(); ?></div>
<div class='subtitle'>Role: <?php echo $role->getTitle(); ?></div>
diff --git a/application/modules/user/views/scripts/person/index.phtml b/application/modules/user/views/scripts/person/index.phtml
index 1304299..93dfd78 100644
--- a/application/modules/user/views/scripts/person/index.phtml
+++ b/application/modules/user/views/scripts/person/index.phtml
@@ -15,14 +15,12 @@ $class='';
if($person->getID() == $this->userIDsNamespace['personID'])
$class= 'highlight checked';
?>
-<div class='element<?php echo " $class";?>'>
-<?php if($person->getID() != $this->userIDsNamespace['personID']) {
+<div class='element<?php echo " $class";?>'><?php if($person->getID() != $this->userIDsNamespace['personID']) {
?>
- <div class='number'>
- <div class='smallnumber'>Person</div>
- <?php echo $k+1; ?>
- </div>
-<?php
+<div class='number'>
+<div class='smallnumber'>Person</div>
+ <?php echo $k+1; ?></div>
+ <?php
}
?>
<div class='content'>
@@ -103,6 +101,33 @@ if($person->getID() == $this->userIDsNamespace['personID']) {
<?php
}
}
+if($this->suspendRight === true) {
+ if($person->getSuspended() == 1) {
+ ?> <a
+ href=" <?php echo $this->url(
+ array(
+ 'module' => 'user',
+ 'controller' => 'person',
+ 'action' => 'resume',
+ 'personID' => $person->getID()
+ ),
+ 'default',
+ true); ?>"> <img src='/media/img/resume.png' alt='Resume Account' /></a>
+ <?php
+ } else {
+ ?> <a
+ href=" <?php echo $this->url(
+ array(
+ 'module' => 'user',
+ 'controller' => 'person',
+ 'action' => 'suspend',
+ 'personID' => $person->getID()
+ ),
+ 'default',
+ true); ?>"> <img src='/media/img/suspend.png'
+ alt='Suspend Account' /></a> <?php
+ }
+}
?></div>
<div class='title'><?php echo $person->getTitle(); ?>&nbsp;<?php echo $person->getFirstname(); ?>&nbsp;<?php echo $person->getName(); ?></div>
<div class='subtitle'><?php echo $person->getEmail(); ?></div>
diff --git a/application/modules/user/views/scripts/person/owndetails.phtml b/application/modules/user/views/scripts/person/owndetails.phtml
index db9221d..dc6e9aa 100644
--- a/application/modules/user/views/scripts/person/owndetails.phtml
+++ b/application/modules/user/views/scripts/person/owndetails.phtml
@@ -1,27 +1,40 @@
<h1>Own Details</h1>
<style>
-label{width:150px !important;}
+label {
+ width: 150px !important;
+}
</style>
<?php if($this->editRight === true) echo $this->formButton('editperson', 'Edit', array(
'onclick' => 'self.location="/user/person/edit/"',
'class' => 'rightbutton'))?>
<div class='listelement'>
<div class='element'>
- <div class='content'>
- <div class='title'><?php echo $this->person->getTitle()." ".$this->person->getFirstname()." ".$this->person->getName(); ?></div>
- <div class='subtitle'><?php echo $this->person->getEmail(); ?></div>
- <div class='details'>
- <label>Street:</label><div class='item'><?php echo $this->person->getStreet(); ?>&nbsp;</div>
- <label>Housenumber:</label><div class='item'><?php echo $this->person->getHousenumber(); ?>&nbsp;</div>
- <label>City:</label><div class='item'><?php echo $this->person->getCity(); ?>&nbsp;</div>
- <label>Postalcode:</label><div class='item'><?php echo $this->person->getPostalcode(); ?>&nbsp;</div>
- <label>Email:</label><div class='item'><?php echo $this->person->getEmail(); ?>&nbsp;</div>
- <label>Last Login:</label><div class='item'><?php if( $this->person->getLogindate()) echo date ('d. F Y - H:i', $this->person->getLogindate()) . " Uhr"; ?>&nbsp;</div>
- <label>Register Date:</label><div class='item'><?php echo date ('d. F Y - H:i', $this->person->getRegisterdate()) . ' Uhr'; ?>&nbsp;</div>
- </div>
- </div>
- <div class='clear'>
+<div class='content'>
+<div class='title'><?php echo $this->person->getTitle()." ".$this->person->getFirstname()." ".$this->person->getName(); ?></div>
+<div class='subtitle'><?php echo $this->person->getEmail(); ?></div>
+<div class='details'><label>Street:</label>
+<div class='item'><?php echo $this->person->getStreet(); ?>&nbsp;</div>
+<label>Housenumber:</label>
+<div class='item'><?php echo $this->person->getHousenumber(); ?>&nbsp;</div>
+<label>City:</label>
+<div class='item'><?php echo $this->person->getCity(); ?>&nbsp;</div>
+<label>Postalcode:</label>
+<div class='item'><?php echo $this->person->getPostalcode(); ?>&nbsp;</div>
+<label>Email:</label>
+<div class='item'><?php echo $this->person->getEmail(); ?>&nbsp;</div>
+<label>Last Login:</label>
+<div class='item'><?php if( $this->person->getLogindate()) echo date ('d. F Y - H:i', $this->person->getLogindate()) . " Uhr"; ?>&nbsp;</div>
+<label>Register Date:</label>
+<div class='item'><?php echo date ('d. F Y - H:i', $this->person->getRegisterdate()) . ' Uhr'; ?>&nbsp;</div>
+<?php if($this->suspendRight === true)
+{
+ ?> <label>Suspended:</label>
+<div class='item'><?php if($this->person->getSuspended() == 1) echo "yes"; else echo "no"; ?></div>
+ <?php
+}
+?></div>
</div>
+<div class='clear'></div>
</div>
<br />
<h2>Member in the following Groups:</h2>
@@ -65,8 +78,7 @@ $class= 'highlight checked';
<?php endforeach ?></div>
<?php echo $this->pagination;
if(isset($this->groupRequestList)) {
- ?>
-<br />
+ ?> <br />
<h2>Requests:</h2>
<div class='listelement'><?php
foreach($this->groupRequestList as $grouprequest) {
@@ -103,4 +115,4 @@ foreach($this->groupRequestList as $grouprequest) {
?></div>
<?php
}
- ?>
+ ?> \ No newline at end of file
diff --git a/application/modules/user/views/scripts/person/show.phtml b/application/modules/user/views/scripts/person/show.phtml
index c43bde3..2f2ef56 100644
--- a/application/modules/user/views/scripts/person/show.phtml
+++ b/application/modules/user/views/scripts/person/show.phtml
@@ -66,7 +66,18 @@
</div>
<div class='clear'></div>
</div>
+<?php if($this->suspendRight === true)
+{
+ ?>
+<div class='element'>
+<div class='content'>
+<div class="title">Suspended:&nbsp;<span class="noBold"><?php if($this->person->getSuspended() == 1) echo "yes"; else echo "no"; ?></span></div>
+</div>
+<div class='clear'></div>
</div>
+ <?php
+}
+?></div>
<br />
<h2>Member in the following Groups:</h2>
<div class='listelement'><?php if(count($this->groups)==0)
@@ -105,18 +116,18 @@ foreach($this->groupRequestList as $grouprequest) {
<div class='element'>
<div class='content'>
<div class='title'><?php echo $group->getTitle(); ?></div>
- <?php if($group->getDescription()) {
- ?>
+ <?php if($group->getDescription()) {
+ ?>
<div class='subtitle'><?php echo $group->getDescription(); ?></div>
- <?php
- } else {
- ?>
+ <?php
+ } else {
+ ?>
<div class='subtitle'>&nbsp;</div>
- <?php
- }
- ?></div>
+ <?php
+ }
+ ?></div>
</div>
- <?php
+ <?php
}
?></div>
<?php