summaryrefslogblamecommitdiffstats
path: root/application/modules/dev/views/scripts/group/show.phtml
blob: 7b3660d674bc61987a7c5c893a04c7c7c88c3290 (plain) (tree)
1
2
3
4
5
6
7
8
9



                       
                                                                    


                                                                            
                                                                        
















































                                                                            
                                                                                        


































                                                                                                                                  
                                                                                         

























                                                                                                 
 
<?php
if($_POST['groupID']) {
	?>
<div align="right">
<form name="editForm" action="/dev/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="/dev/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="/dev/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="/dev/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>";
}