summaryrefslogtreecommitdiffstats
path: root/application/modules/user/views/scripts/group
diff options
context:
space:
mode:
authormichael pereira2011-04-07 14:45:51 +0200
committermichael pereira2011-04-07 14:45:51 +0200
commit6af094f483774692b0d9178b917abc04fa50d446 (patch)
tree27ba087e16d6fce71ebf499cf2e5a91771ef6f78 /application/modules/user/views/scripts/group
parentMeta Recht geƤndert (diff)
parentfix der mapper in der fbgui (diff)
downloadpbs2-6af094f483774692b0d9178b917abc04fa50d446.tar.gz
pbs2-6af094f483774692b0d9178b917abc04fa50d446.tar.xz
pbs2-6af094f483774692b0d9178b917abc04fa50d446.zip
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application/modules/user/views/scripts/group')
-rw-r--r--application/modules/user/views/scripts/group/show.phtml61
-rw-r--r--application/modules/user/views/scripts/group/showall.phtml57
2 files changed, 69 insertions, 49 deletions
diff --git a/application/modules/user/views/scripts/group/show.phtml b/application/modules/user/views/scripts/group/show.phtml
index 12c149f..a869c76 100644
--- a/application/modules/user/views/scripts/group/show.phtml
+++ b/application/modules/user/views/scripts/group/show.phtml
@@ -87,27 +87,19 @@ if($this->groupID) {
?>
<br />
<h2>Members:</h2>
-<table>
- <tr>
- <th>Firstname</th>
- <th>Name</th>
- <th>email</th>
- <th>city</th>
- <th>revoke</th>
- </tr>
-
- <?php
- foreach($this->membersList as $member) {
+<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'];
- ?>
- <tr class="entry">
- <td><?php echo $person->getFirstname(); ?></td>
- <td><?php echo $person->getName(); ?></td>
- <td><?php echo $person->getEmail(); ?></td>
- <td><?php echo $person->getCity(); ?></td>
- <td class='action'><a
- href="<?php echo $this->url(
+ $role = $member['role'];
+ ?>
+ <div class='element'>
+ <div class='content'>
+ <div class='actions'>
+ <a href="<?php echo $this->url(
array(
'module' => 'user',
'controller' => 'group',
@@ -115,13 +107,32 @@ if($this->groupID) {
'membershipID' => $membershipID,
),
'default',
- true) ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a>
- </td>
- </tr>
- <?php
+ 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>
+<script>
+$(document).ready(function(){
+ if($('.element').find('.dispnone').length >= 1){
+ $(this).find('.title').css('cursor','pointer');
+
+ $('.title').click(function(){
+ $(this).siblings('.dispnone').toggle();
+ });
}
- ?>
-</table>
+});
+</script>
<?php echo $this->memberPagination; ?>
<?php
}
diff --git a/application/modules/user/views/scripts/group/showall.phtml b/application/modules/user/views/scripts/group/showall.phtml
index 7f6be67..9afedbb 100644
--- a/application/modules/user/views/scripts/group/showall.phtml
+++ b/application/modules/user/views/scripts/group/showall.phtml
@@ -4,20 +4,28 @@
'onclick' => 'self.location="/user/group/add"',
'class' => 'addbutton'))
?>
-<table>
- <tr>
- <th>Title <span class='code'>title</span></th>
- <th colspan=3>Actions</th>
- </tr>
+
+<div class='searchvars'>
+ <div class='head'>Available searchfilter:</div>
+ <div class='code'>title</div>
+ <div class='code'>description</div>
+</div>
+
+<div class='listelement'>
<?php
$count = 0;
- foreach($this->groupList as $group) {
+ if(count($this->groupList)==0)
+ echo "There are no groups" ?>
+ <?php foreach ($this->groupList as $group): ?>
+ <?php
+ $class='';
+ if($group->getID() == $this->userIDsNamespace['groupID'])
+ $class= 'highlight';
?>
- <tr
- <?php if($group->getID() == $this->userIDsNamespace['groupID']) echo 'class="selectedEntry"'; else echo 'class="entry"'; ?>>
- <td><?php echo $group->getTitle(); ?></td>
- <td class='action'><a
- href="<?php if($group->getID() == $this->userIDsNamespace['groupID']) echo $this->url(
+ <div class='element<?php echo " $class";?>'>
+ <div class='content'>
+ <div class='actions'>
+ <a href="<?php if($group->getID() == $this->userIDsNamespace['groupID']) echo $this->url(
array(
'module' => 'user',
'controller' => 'group',
@@ -33,8 +41,7 @@
),
'default',
true); ?>"> <img src='/media/img/show.png' alt='Show Group' /></a></td>
- <td class='action'><a
- href="<?php if($group->getID() == $this->userIDsNamespace['groupID']) echo $this->url(
+ <a href="<?php if($group->getID() == $this->userIDsNamespace['groupID']) echo $this->url(
array(
'module' => 'user',
'controller' => 'group',
@@ -50,8 +57,7 @@
),
'default',
true); ?>"> <img src='/media/img/edit.png' alt='Edit Group' /></a></td>
- <td class='action'><a
- href="<?php if($group->getID() == $this->userIDsNamespace['groupID']) echo $this->url(
+ <a href="<?php if($group->getID() == $this->userIDsNamespace['groupID']) echo $this->url(
array(
'module' => 'user',
'controller' => 'group',
@@ -67,15 +73,18 @@
),
'default',
true); ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a>
- </td>
- </tr>
- <?php
- $count++;
- }
- ?>
-</table>
- <?php echo $this->pagination; ?>
- <?php echo $this->formButton('linkgroups', 'Link Groups', array(
+ </div>
+ <div class='title'><?php echo $group->getTitle(); ?></div>
+ <div class='subtitle'><?php echo $group->getDescription(); ?></div>
+ </div>
+ <div class='clear'></div>
+ </div>
+ <?php $count++; ?>
+ <?php endforeach ?>
+</div>
+<?php echo $this->pagination; ?>
+
+<?php echo $this->formButton('linkgroups', 'Link Groups', array(
'onclick' => 'self.location="/user/group/link"',
'class' => 'addbutton'))
?>