3 * Project Members Information
5 * Portions Copyright 1999-2001 (c) VA Linux Systems
6 * The rest Copyright 2002-2004 (c) GForge Team
9 * This file is part of GForge.
11 * GForge is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * GForge is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with GForge; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 require_once('../env.inc.php');
27 require_once $gfcommon.'include/pre.php';
29 $group_id = getIntFromGet("group_id");
30 $form_grp = getIntFromGet("form_grp");
32 if (!$group_id && $form_grp) {
33 $group_id = $form_grp;
36 site_project_header(array('title'=>_('Project Member List'),'group'=>$group_id,'toptab'=>'memberlist'));
38 echo '<h1>' . _('Project Member List') . '</h1>';
40 echo '<p>' . _('If you would like to contribute to this project by becoming a developer, contact one of the project admins, designated in bold text below.') . '</p>';
41 // beginning of the user descripion block
42 $project =& group_get_object($group_id);
43 $project_stdzd_uri = util_make_url_g ($project->getUnixName(), $group_id);
44 $usergroup_stdzd_uri = $project_stdzd_uri.'members/';
45 print '<div about="'. $usergroup_stdzd_uri .'" typeof="sioc:UserGroup" xmlns:sioc="http://rdfs.org/sioc/ns#">';
46 print '<span rel="http://www.w3.org/2002/07/owl#sameAs" resource=""></span>';
47 print '<span rev="sioc:has_usergroup" resource="'. $project_stdzd_uri . '"></span>';
51 $title_arr[]=_('Member');
52 $title_arr[]=_('Username');
53 $title_arr[]=_('Role/Position');
54 if(forge_get_config('use_people')) {
55 $title_arr[]=_('Skills');
58 echo $GLOBALS['HTML']->listTableTop ($title_arr);
61 $members = $project->getUsers() ;
64 foreach ($members as $user) {
65 echo '<tr '.$HTML->boxGetAltRowStyle($i++).'>'."\n";
67 $member_uri = util_make_url_u ($user->getUnixName(),$user->getID());
68 print '<div about="'. $member_uri .'" typeof="sioc:UserAccount">';
69 print '<span rev="sioc:has_member" resource="'. $usergroup_stdzd_uri .'"></span>';
70 print '<span property="sioc:name" content="'. $user->getUnixName() .'"></span>';
71 if ( RBACEngine::getInstance()->isActionAllowedForUser($user,'project_admin',$project->getID())) {
72 // echo '<div rev="doap:developer" typeof="doap:Project" xmlns:doap="http://usefulinc.com/ns/doap#">';
73 echo ' <td><strong>'.$user->getRealName().'</strong></td>';
76 // echo '<div rev="doap:maintainer" typeof="doap:Project" xmlns:doap="http://usefulinc.com/ns/doap#">';
77 echo ' <td>'.$user->getRealName().'</td>';
82 print '<span property ="dc:Identifier" content="'.$user->getID().'" xmlns:dc="http://purl.org/dc/elements/1.1/">';
84 print '<span property="foaf:accountName" content="'.$user->getUnixName().'">';
86 print '<span property="fusionforge:has_job" content="'.$role_string.'" xmlns:fusionforge="http://fusionforge.org/fusionforge#">';
90 $roles = RBACEngine::getInstance()->getAvailableRolesForUser ($user) ;
91 $role_names = array () ;
92 foreach ($roles as $role) {
93 if ($role->getHomeProject() && $role->getHomeProject()->getID() == $project->getID()) {
94 $role_names[] = $role->getName() ;
97 $role_string = implode (', ', $role_names) ;
99 $role_string = $user->getRole ($project)->getName() ;
102 echo '<td align="center">'.util_make_link_u ($user->getUnixName(),$user->getID(),$user->getUnixName()).'</td>
103 <td align="center">'.$role_string.'</td>';
104 if(forge_get_config('use_people')) {
105 echo '<td align="center">'.util_make_link ('/people/viewprofile.php?user_id='.$user->getID(),_('View')).'</td>';
110 // end of community member description block
111 echo $GLOBALS['HTML']->listTableBottom();
113 site_project_footer(array());