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. FusionForge is free software;
11 * you can redistribute it and/or modify it under the terms of the
12 * GNU General Public License as published by the Free Software
13 * Foundation; either version 2 of the Licence, or (at your option)
16 * FusionForge 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 along
22 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 require_once('../env.inc.php');
27 require_once $gfcommon.'include/pre.php';
28 require_once $gfwww.'include/vote_function.php';
29 require_once $gfcommon.'tracker/ArtifactFactory.class.php';
30 require_once $gfcommon.'tracker/ArtifactsForUser.class.php';
31 require_once $gfcommon.'forum/ForumsForUser.class.php';
32 require_once $gfcommon.'pm/ProjectTasksForUser.class.php';
34 if (!session_loggedin()) {
37 site_user_header(array('title'=>sprintf(_('Personal Page For %s'),user_getname())));
40 <table width="100%" border="0">
41 <tr><td valign="top" width="100%">
44 echo $HTML->boxTop(_('All trackers for my projects'),false,false);
45 // Include both groups and foundries; developers should be similarly
46 // aware of membership in either.
47 $projects = session_get_user()->getGroups() ;
48 if (count ($projects) < 1) {
49 echo '<strong>'._('You\'re not a member of any active projects').'</strong>';
51 $display_col=array('summary'=>1,
62 if ($display_col['summary'])
63 $title_arr[]=_('Summary');
64 if ($display_col['changed'])
65 $title_arr[]=_('Changed');
66 if ($display_col['status'])
67 $title_arr[]=_('Status');
68 if ($display_col['priority'])
69 $title_arr[]=_('Priority');
70 if ($display_col['assigned_to'])
71 $title_arr[]=_('Assigned to');
72 if ($display_col['submitted_by'])
73 $title_arr[]=_('Submitted by');
74 if ($display_col['related_tasks'])
75 $title_arr[]=_('Tasks');
77 echo $GLOBALS['HTML']->listTableTop ($title_arr);
79 foreach ($projects as $p) {
80 $admin_flags = forge_check_perm ('project_admin',$p->getID()) ;
82 // get the Project object
84 $atf = new ArtifactTypeFactory($p);
85 $at_arr =& $atf->getArtifactTypes();
89 if(count($at_arr) > 0) {
92 <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> • ' .
93 util_make_link ('/tracker/?group_id='.$p->getID(),
95 . '</strong></td></tr>';
96 foreach($at_arr as $at) {
99 // Create the ArtifactType object
101 $ath = new ArtifactTypeHtml($p,$at->getID());
102 // create artifact object, setup object
103 $af = new ArtifactFactory($ath);
104 $af->setup(0,"priority","DESC",0,"",0,1,null);
105 // get artifacts from object
106 $art_arr =& $af->getArtifacts();
107 if (count($art_arr) > 0) {
108 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> · '.
109 util_make_link ('/tracker/?group_id='.$at->Group->getID().'&atid='.$at->getID(),
110 $at->getName()) . '</strong></td></tr>';
112 foreach($art_arr as $art) {
113 echo '<tr '. $HTML->boxGetAltRowStyle($toggle++) . ' valign="top"><td align="center">'. $art->getID() .'</td>';
114 if ($display_col['summary'])
115 echo '<td align="left"><a href="/tracker/?func=detail&aid='.
117 '&group_id='. $p->getID() .'&atid='.
121 if ($display_col['changed'])
122 echo '<td width="150">'
123 .date(_('Y-m-d'),$art->getLastModifiedDate()) .'</td>';
124 if ($display_col['status'])
125 echo '<td>'. $art->getStatusName() .'</td>';
126 if ($display_col['priority'])
127 echo '<td class="priority'.$art->getPriority() .'" align="center">'. $art->getPriority() .'</td>';
128 if ($display_col['assigned_to'])
129 echo '<td>'. $art->getAssignedRealName() .'</td>';
130 if ($display_col['submitted_by'])
131 echo '<td>'. $art->getSubmittedRealName() .'</td>';
132 if ($display_col['related_tasks']) {
133 $result_tasks = $art->getRelatedTasks();
135 $taskcount = db_numrows($art->relatedtasks);
137 if ($taskcount > 0) {
138 for ($itask = 0; $itask < $taskcount; $itask++) {
141 $taskinfo = db_fetch_array($art->relatedtasks, $itask);
142 $taskid = $taskinfo['project_task_id'];
143 $projectid = $taskinfo['group_project_id'];
144 $groupid = $taskinfo['group_id'];
145 $g = group_get_object($groupid);
146 $pg = new ProjectGroup($g, $projectid);
147 echo $pg->getName().'<br/>';
148 $summary = util_unconvert_htmlspecialchars($taskinfo['summary']);
149 echo '<a href="../pm/task.php?func=detailtask&project_task_id='.$taskid.'&group_id='.$groupid.'&group_project_id='.$projectid.'">';
164 <td colspan="' . (array_sum($display_col)+1) . '" align="left"><strong> --</strong></td></tr>';
168 echo $GLOBALS['HTML']->listTableBottom();
171 echo $HTML->boxBottom();
173 //second column of "my" page
175 echo '</td><td valign="top"></td></tr>
180 <tr><td colspan="2">';
181 echo show_priority_colors_key();
187 echo site_user_footer(array());