diff options
| author | Simon | 2011-03-14 16:09:03 +0100 |
|---|---|---|
| committer | Simon | 2011-03-14 16:09:03 +0100 |
| commit | b5cbdd6b400aa1ec77c9846e9cc8d4257f437e3c (patch) | |
| tree | fcef50ad1ddf831f457d6aecd83e7fdc63297a1c /application/modules/dev/views/scripts/group/show.phtml | |
| parent | footer bleibt am fensterbottom (diff) | |
| download | pbs2-b5cbdd6b400aa1ec77c9846e9cc8d4257f437e3c.tar.gz pbs2-b5cbdd6b400aa1ec77c9846e9cc8d4257f437e3c.tar.xz pbs2-b5cbdd6b400aa1ec77c9846e9cc8d4257f437e3c.zip | |
Application in 3 Modules gesplittet, Dev = unsere entwicklungsumgebung, user = die weboberfläche fr anwender mit acl etc, fbgui = für die fbgui truppe - links in dev müssen noch angepasst werden
Diffstat (limited to 'application/modules/dev/views/scripts/group/show.phtml')
| -rw-r--r-- | application/modules/dev/views/scripts/group/show.phtml | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/application/modules/dev/views/scripts/group/show.phtml b/application/modules/dev/views/scripts/group/show.phtml new file mode 100644 index 0000000..addf3db --- /dev/null +++ b/application/modules/dev/views/scripts/group/show.phtml @@ -0,0 +1,122 @@ +<?php +if($_POST['groupID']) { + ?> +<div align="right"> +<form name="editForm" action="/group/edit/" method="post"><input + type="hidden" name="groupID" + value="<?php echo $this->group->getID(); ?>" /> <input type="submit" + name="edit" value="Edit" /></form> +<form name="deleteForm" action="/group/delete/" method="post"><input + type="hidden" name="groupID" + value="<?php echo $this->group->getID(); ?>" /> <input type="submit" + name="delete" value="Delete" /></form> +</div> +<table> + <tr> + <td><b>Title:</b></td> + <td><?php echo $this->group->getTitle(); ?></td> + </tr> + <tr> + <td><b>Description:</b></td> + <td><?php echo $this->group->getDescription(); ?></td> + </tr> + <?php + if(isset($parentGroup) && is_object($parentGroup)) { + ?> + <tr> + <td><b>Superordinated Group:</b></td> + <td><?php echo $this->parentGroup->getTitle(); ?></td> + </tr> + <?php + } + ?> +</table> + <?php + if(isset($this->groupRequestList)) { + ?> +<br /> +<div>Grouprequests:</div> +<br /> +<table> + <tr> + <th>Firstname:</th> + <th>Name:</th> + <th>email:</th> + <th>city:</th> + <th>grant:</th> + </tr> + <?php + foreach($this->groupRequestList as $grouprequest) { + $grouprequestID = $grouprequest['grouprequestID']; + $person = $grouprequest['person']; + ?> + <tr> + <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> + <form action="/group/grantperson" method="post"><input type="hidden" + name="grouprequestID" value="<?php echo $grouprequestID; ?>" /> <?php printRoleSelect($this->roleList); ?> + <input type="submit" name="confirm" value="confirm" /></form> + </td> + </tr> + <?php + } + ?> +</table> + <?php + } + if(isset($this->memberslist)) { + ?> +<br /> +<div>Members:</div> +<br /> +<table> + <tr> + <th>Firstname:</th> + <th>Name:</th> + <th>email:</th> + <th>city:</th> + <th></th> + </tr> + + <?php + foreach($this->memberslist as $member) { + $membershipID = $member['membershipID']; + $person = $member['person']; + ?> + <tr> + <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> + <form action="/group/revokeperson" method="post"><input type="hidden" + name="membershipID" value="<?php echo $membershipID; ?>" /><input + type="hidden" name="personID" value="<?php echo $person->getID(); ?>" /> + <input type="submit" name="revoke" value="revoke" /></form> + </td> + </tr> + <?php + } + ?> +</table> + <?php + } +} else { + ?> +<div>No Group has been chosen.</div> + <?php +} + +function printRoleSelect($roleList) { + if(!is_array($roleList)) { + return; + } + echo "<select name=\"roleID\">"; + foreach($roleList as $role) { + echo "<option value=\"" . $role['roleID'] . "\">" . $role['title'] . "</option>"; + } + echo "</select>"; +}
\ No newline at end of file |
