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-2010, 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 $gfcommon.'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 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 $projects = session_get_user()->getGroups() ;
50 if (count ($projects) < 1) {
51 echo '<strong>'._('You\'re not a member of any active projects').'</strong>';
53 $display_col=array('summary'=>1,
64 if ($display_col['summary'])
65 $title_arr[]=_('Summary');
66 if ($display_col['changed'])
67 $title_arr[]=_('Changed');
68 if ($display_col['status'])
69 $title_arr[]=_('Status');
70 if ($display_col['priority'])
71 $title_arr[]=_('Priority');
72 if ($display_col['assigned_to'])
73 $title_arr[]=_('Assigned to');
74 if ($display_col['submitted_by'])
75 $title_arr[]=_('Submitted by');
76 if ($display_col['related_tasks'])
77 $title_arr[]=_('Tasks');
79 echo $GLOBALS['HTML']->listTableTop ($title_arr);
81 foreach ($projects as $p) {
82 $admin_flags = forge_check_perm ('project_admin',$p->getID()) ;
84 // get the Project object
86 $atf = new ArtifactTypeFactory($p);
87 $at_arr =& $atf->getArtifactTypes();
91 if(count($at_arr) > 0) {
94 <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> • ' .
95 util_make_link ('/tracker/?group_id='.$group->getID(),
96 $group->getPublicName())
97 . '</strong></td></tr>';
98 foreach($at_arr as $at) {
101 // Create the ArtifactType object
103 $ath = new ArtifactTypeHtml($group,$at->getID());
104 // create artifact object, setup object
105 $af = new ArtifactFactory($ath);
106 $af->setup(0,"priority","DESC",0,"",0,1,null);
107 // get artifacts from object
108 $art_arr =& $af->getArtifacts();
109 if (count($art_arr) > 0) {
110 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> · '.
111 util_make_link ('/tracker/?group_id='.$at->Group->getID().'&atid='.$at->getID(),
112 $at->getName()) . '</strong></td></tr>';
114 foreach($art_arr as $art) {
115 echo '<tr '. $HTML->boxGetAltRowStyle($toggle++) . ' valign="top"><td align="center">'. $art->getID() .'</td>';
116 if ($display_col['summary'])
117 echo '<td align="left"><a href="/tracker/?func=detail&aid='.
119 '&group_id='. $group_id .'&atid='.
123 if ($display_col['changed'])
124 echo '<td width="150">'
125 .date(_('Y-m-d'),$art->getLastModifiedDate()) .'</td>';
126 if ($display_col['status'])
127 echo '<td>'. $art->getStatusName() .'</td>';
128 if ($display_col['priority'])
129 echo '<td class="priority'.$art->getPriority() .'" align="center">'. $art->getPriority() .'</td>';
130 if ($display_col['assigned_to'])
131 echo '<td>'. $art->getAssignedRealName() .'</td>';
132 if ($display_col['submitted_by'])
133 echo '<td>'. $art->getSubmittedRealName() .'</td>';
134 if ($display_col['related_tasks']) {
135 $result_tasks = $art->getRelatedTasks();
137 $taskcount = db_numrows($art->relatedtasks);
139 if ($taskcount > 0) {
140 for ($itask = 0; $itask < $taskcount; $itask++) {
143 $taskinfo = db_fetch_array($art->relatedtasks, $itask);
144 $taskid = $taskinfo['project_task_id'];
145 $projectid = $taskinfo['group_project_id'];
146 $groupid = $taskinfo['group_id'];
147 $g =& group_get_object($groupid);
148 $pg = new ProjectGroup($g, $projectid);
149 echo $pg->getName().'<br/>';
150 $summary = util_unconvert_htmlspecialchars($taskinfo['summary']);
151 echo '<a href="../pm/task.php?func=detailtask&project_task_id='.$taskid.'&group_id='.$groupid.'&group_project_id='.$projectid.'">';
166 <td colspan="' . (array_sum($display_col)+1) . '" align="left"><strong> --</strong></td></tr>';
170 echo $GLOBALS['HTML']->listTableBottom();
173 echo $HTML->boxBottom();
175 //second column of "my" page
177 echo '</td><td valign="top"></td></tr>
182 <tr><td colspan="2">';
183 echo show_priority_colors_key();
189 echo site_user_footer(array());