<?php
require_once("module/module.project_workgroup.php");
$groups = new CModuleWorkGroup();
$groups->Init($project_id);
?>

<span class="big">工作组和成员</span> 
<span class="link" id="add_workgroup" onclick="ClickEditWorkGroup('add', 0)"><img src="imgs/icon_worklog.gif" class="icon">新增工作组</span>
<hr size=1 width=80% align=left color=#CCCCCC>
<?php for($i=0;$i<$groups->GetSize();$i++){?>
	
	<img src="imgs/b_usrlist.png">
	<b><?php echo $groups->modules[$i]->group_name ?></b>
	<?php echo $groups->modules[$i]->group_desc ?>
	<br>
	
	<b>成员</b> <br>
	<?php for($n=0; $n<sizeof($groups->modules[$i]->group_members); $n++){ 
		echo $groups->modules[$i]->group_members[$n]->real_name . ";&nbsp;&nbsp;";
	}?>
	<br>
	
	<b>权限</b> <br>
	<?php for($n=0;$n<sizeof($Config["issue_grade"]);$n++){ ?>
		<input type=checkbox <?php if($Config["issue_grade"][$n]&$groups->modules[$i]->group_grade) echo "checked"?> disabled>
		<?php echo $Config["issue_grade_name"][$n]?> 
	<?php } ?>
	<br><br>
	
	<span class="link" onclick="ClickEditWorkGroup('mod', <?php echo $groups->modules[$i]->group_id?>)"><img src="imgs/b_edit.png" alt="编辑">编辑</span>
	<span class="link" onclick="ClickDelWorkGroup(<?php echo $groups->modules[$i]->group_id?>, '<?php echo $groups->modules[$i]->group_name; ?>')"><img src="imgs/b_drop.png" alt="删除">删除</span>
	
	<br><br><br> 
<?php }?>