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
9 * Copyright (C) 2012 Alain Peyrat - Alcatel-Lucent
11 * This file is part of FusionForge. FusionForge is free software;
12 * you can redistribute it and/or modify it under the terms of the
13 * GNU General Public License as published by the Free Software
14 * Foundation; either version 2 of the Licence, or (at your option)
17 * FusionForge is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License along
23 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 require_once('../env.inc.php');
28 require_once $gfcommon.'include/pre.php';
29 require_once $gfwww.'include/vote_function.php';
30 require_once $gfcommon.'tracker/ArtifactFactory.class.php';
31 require_once $gfcommon.'tracker/ArtifactsForUser.class.php';
32 require_once $gfcommon.'forum/ForumsForUser.class.php';
33 require_once $gfcommon.'pm/ProjectTasksForUser.class.php';
35 if (!session_loggedin()) {
38 $u = session_get_user();
39 site_user_header(array('title'=>sprintf(_('Personal Page For %s'), $u->getRealName())));
42 <table class="fullwidth">
43 <tr><td class="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='.$p->getID(),
97 . '</strong></td></tr>';
98 foreach($at_arr as $at) {
101 // Create the ArtifactType object
103 $ath = new ArtifactTypeHtml($p,$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++) . ' class="top"><td class="align-center">'. $art->getID() .'</td>';
116 if ($display_col['summary'])
117 echo '<td class="align-left"><a href="/tracker/?func=detail&aid='.
119 '&group_id='. $p->getID() .'&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++) {
144 $taskinfo = db_fetch_array($art->relatedtasks, $itask);
145 $taskid = $taskinfo['project_task_id'];
146 $projectid = $taskinfo['group_project_id'];
147 $groupid = $taskinfo['group_id'];
148 $g = group_get_object($groupid);
149 $pg = new ProjectGroup($g, $projectid);
150 echo $pg->getName().'<br/>';
151 $summary = util_unconvert_htmlspecialchars($taskinfo['summary']);
152 echo '<a href="../pm/task.php?func=detailtask&project_task_id='.$taskid.'&group_id='.$groupid.'&group_project_id='.$projectid.'">';
167 <td colspan="' . (array_sum($display_col)+1) . '" align="left"><strong> --</strong></td></tr>';
171 echo $GLOBALS['HTML']->listTableBottom();
173 echo $HTML->boxBottom();
175 //second column of "my" page
177 echo '</td><td class="top"></td></tr>
181 <tr><td colspan="2">';
182 echo show_priority_colors_key();
187 echo site_user_footer(array());