3 * FusionForge User's Personal Page
5 * Copyright 1999-2001, VA Linux Systems, Inc.
6 * Copyright 2002-2004, GForge Team
7 * Copyright 2009, Jean-Pierre Fortune/Spirtech
8 * Copyright 2009, Roland Mas
10 * This file is part of FusionForge.
12 * FusionForge is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published
14 * by the Free Software Foundation; either version 2 of the License,
15 * or (at your option) any later version.
17 * FusionForge is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with FusionForge; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
28 require_once('../env.inc.php');
29 require_once $gfwww.'include/pre.php';
30 require_once $gfwww.'include/vote_function.php';
31 require_once $gfcommon.'tracker/ArtifactFactory.class.php';
32 require_once $gfcommon.'tracker/ArtifactsForUser.class.php';
33 require_once $gfcommon.'forum/ForumsForUser.class.php';
34 require_once $gfcommon.'pm/ProjectTasksForUser.class.php';
36 if (!session_loggedin()) {
39 echo site_user_header(array('title'=>sprintf(_('Personal Page For %s'),user_getname())));
42 <table width="100%" border="0">
43 <tr><td valign="top" width="100%">
46 echo $HTML->boxTop(_('All trackers for my projects'),false,false);
47 // Include both groups and foundries; developers should be similarly
48 // aware of membership in either.
49 $result = db_query_params ('SELECT groups.group_name,
51 groups.unix_group_name,
54 user_group.admin_flags
55 FROM groups,user_group
56 WHERE groups.group_id=user_group.group_id
57 AND user_group.user_id=$1
62 $rows=db_numrows($result);
63 if (!$result || $rows < 1) {
64 echo '<strong>'._('You\'re not a member of any active projects').'</strong>';
67 $display_col=array('summary'=>1,
78 if ($display_col['summary'])
79 $title_arr[]=_('Summary');
80 if ($display_col['changed'])
81 $title_arr[]=_('Changed');
82 if ($display_col['status'])
83 $title_arr[]=_('Status');
84 if ($display_col['priority'])
85 $title_arr[]=_('Priority');
86 if ($display_col['assigned_to'])
87 $title_arr[]=_('Assigned to');
88 if ($display_col['submitted_by'])
89 $title_arr[]=_('Submitted by');
90 if ($display_col['related_tasks'])
91 $title_arr[]=_('Tasks');
93 echo $GLOBALS['HTML']->listTableTop ($title_arr);
95 for ($i=0; $i<$rows; $i++) {
96 $admin_flags = db_result($result, $i, 'admin_flags');
98 if (db_result($result, $i, 'type_id')==2) {
104 $group_id = db_result($result,$i,'group_id');
106 // get the Group object
108 $group =& group_get_object($group_id);
109 if (!$group || !is_object($group) || $group->isError()) {
113 $atf = new ArtifactTypeFactory($group);
114 if (!$group || !is_object($group) || $group->isError()) {
115 exit_error('Error','Could Not Get ArtifactTypeFactory');
118 $at_arr =& $atf->getArtifactTypes();
122 if(count($at_arr) > 0) {
125 <td colspan="' . (array_sum($display_col)+1) . '" align="left" style="background-color: #CADACA; padding-top: 4px; border-top: 1px dotted darkgreen; border-bottom: 1px solid darkgreen; font-size: larger; color: darkgreen;"><strong> • ' .
126 util_make_link ('/tracker/?group_id='.$group->getID(),
127 $group->getPublicName())
128 . '</strong></td></tr>';
129 foreach($at_arr as $at) {
132 // Create the ArtifactType object
134 $ath = new ArtifactTypeHtml($group,$at->getID());
135 // create artifact object, setup object
136 $af = new ArtifactFactory($ath);
137 $af->setup(0,"priority","DESC",0,"",0,1,null);
138 // get artifacts from object
139 $art_arr =& $af->getArtifacts();
140 if (count($art_arr) > 0) {
141 echo '<tr><td colspan="' . (array_sum($display_col)+1) . '" align="left" style="color: darkred; border-bottom: 1px solid #A0A0C0; border-top: 1px dotted #A0A0C0; background-color: #CACADA;"><strong> · '.
142 util_make_link ('/tracker/?group_id='.$at->Group->getID().'&atid='.$at->getID(),
143 $at->getName()) . '</strong></td></tr>';
145 foreach($art_arr as $art) {
146 echo '<tr '. $HTML->boxGetAltRowStyle($toggle++) . ' valign="top"><td align="center">'. $art->getID() .'</td>';
147 if ($display_col['summary'])
148 echo '<td align="left"><a href="/tracker/?func=detail&aid='.
150 '&group_id='. $group_id .'&atid='.
154 if ($display_col['changed'])
155 echo '<td width="150">'
156 .date(_('Y-m-d'),$art->getLastModifiedDate()) .'</td>';
157 if ($display_col['status'])
158 echo '<td>'. $art->getStatusName() .'</td>';
159 if ($display_col['priority'])
160 echo '<td class="priority'.$art->getPriority() .'" align="center">'. $art->getPriority() .'</td>';
161 if ($display_col['assigned_to'])
162 echo '<td>'. $art->getAssignedRealName() .'</td>';
163 if ($display_col['submitted_by'])
164 echo '<td>'. $art->getSubmittedRealName() .'</td>';
165 if ($display_col['related_tasks']) {
166 $result_tasks = $art->getRelatedTasks();
168 $taskcount = db_numrows($art->relatedtasks);
170 if ($taskcount > 0) {
171 for ($itask = 0; $itask < $taskcount; $itask++) {
174 $taskinfo = db_fetch_array($art->relatedtasks, $itask);
175 $taskid = $taskinfo['project_task_id'];
176 $projectid = $taskinfo['group_project_id'];
177 $groupid = $taskinfo['group_id'];
178 $g =& group_get_object($groupid);
179 $pg = new ProjectGroup($g, $projectid, $arrtasks);
180 echo $pg->getName().'<br/>';
181 $summary = util_unconvert_htmlspecialchars($taskinfo['summary']);
182 echo '<a href="../pm/task.php?func=detailtask&project_task_id='.$taskid.'&group_id='.$groupid.'&group_project_id='.$projectid.'">';
197 <td colspan="' . (array_sum($display_col)+1) . '" align="left"><strong> --</strong></td></tr>';
201 echo $GLOBALS['HTML']->listTableBottom();
204 echo $HTML->boxBottom();
206 //second column of "my" page
208 echo '</td><td valign="top"></td></tr>
213 <tr><td colspan="2">';
214 echo show_priority_colors_key();
220 echo site_user_footer(array());