3 * GForge Project Management Facility
5 * Copyright 2002 GForge, LLC
12 By Tim Perdue, Sourceforge, 11/99
13 Heavy rewrite by Tim Perdue April 2000
15 Total rewrite in OO and GForge coding guidelines 12/2002 by Tim Perdue
18 require_once $gfwww.'include/note.php';
19 require_once $gfcommon.'reporting/report_utils.php';
20 require_once $gfcommon.'reporting/Report.class.php';
22 pm_header(array('title'=>_('Modify Task'),'pagename'=>'pm_modtask','group_project_id'=>$group_project_id));
28 <form id="modtaskform" action="<?php echo getStringFromServer('PHP_SELF')."?group_id=$group_id&group_project_id=$group_project_id"; ?>" method="post">
29 <input type="hidden" name="func" value="postmodtask" />
30 <input type="hidden" name="project_task_id" value="<?php echo $project_task_id; ?>" />
32 <table border="0" width="100%" class="mod_task">
35 <td><strong><?php echo _('Submitted by') ?>:</strong><br />
36 <?php echo $pt->getSubmittedRealName(); ?> (<?php echo $pt->getSubmittedUnixName(); ?>)</td>
37 <td><input type="submit" value="<?php echo _('Submit') ?>" name="submit" /></td>
38 <td><strong>Task ID:</strong> <?php echo $project_task_id; ?> @ <?php
39 echo forge_get_config ('web_host') ; ?></td>
44 <strong><?php echo _('Category') ?></strong><br />
45 <?php echo $pg->categoryBox('category_id',$pt->getCategoryID()); ?> <?php util_make_link ('/pm/admin/?<?php echo "group_id=$group_id&add_cat=1&group_project_id='.$group_project_id,_('admin')); ?>
49 <strong><?php echo _('Subproject'); ?>:</strong><br />
50 <?php echo $pg->groupProjectBox('new_group_project_id',$group_project_id,false); ?>
54 <strong><a href="<?php echo util_make_url("/pm/t_follow.php/" . $project_task_id); ?>">Permalink</a>:</strong><br />
55 <?php echo util_make_url("/pm/t_follow.php/" . $project_task_id); ?>
61 <strong><?php echo _('Percent Complete') ?>:</strong><br />
62 <?php echo $pg->percentCompleteBox('percent_complete',$pt->getPercentComplete()); ?>
66 <strong><?php echo _('Priority') ?>:</strong><br />
67 <?php echo build_priority_select_box('priority',$pt->getPriority()); ?>
71 <strong>Task Detail Information (JSON):</strong><br />
72 <a href="<?php echo util_make_url("/pm/t_lookup.php?tid=" . $project_task_id); ?>">application/json</a>
74 <a href="<?php echo util_make_url("/pm/t_lookup.php?text=1&tid=" . $project_task_id); ?>">text/plain</a>
80 <strong><?php echo _('Task Summary') ?>:</strong><br />
81 <input type="text" name="summary" size="65" maxlength="65" value="<?php echo $pt->getSummary(); ?>" />
84 <a href="<?php echo getStringFromServer('PHP_SELF')."?func=deletetask&project_task_id=$project_task_id&group_id=$group_id&group_project_id=$group_project_id"; ?>"><?php echo _('Delete this task') ?></a>
90 <strong><?php echo _('Original Comment') ?>:</strong><br />
91 <?php echo nl2br( $pt->getDetails() ); ?>
93 <strong><?php echo _('Add A Comment') ?>:</strong><?php echo notepad_button('document.forms.modtaskform.details') ?><br />
94 <textarea name="details" rows="5" cols="80"></textarea>
100 <strong><?php echo _('Start Date') ?>:</strong><br />
102 echo $pg->showMonthBox ('start_month',date('m', $pt->getStartDate()));
103 echo $pg->showDayBox ('start_day',date('d', $pt->getStartDate()));
104 echo $pg->showYearBox ('start_year',date('Y', $pt->getStartDate()));
105 echo $pg->showHourBox ('start_hour',date('G', $pt->getStartDate()));
106 echo $pg->showMinuteBox ('start_minute',date('i',$pt->getStartDate()));
107 ?><br /><?php echo _('The system will modify your start/end dates if you attempt to create a start date earlier than the end date of any tasks you depend on.') ?>
108 <br /><a href="calendar.php?group_id=<?php echo $group_id; ?>&group_project_id=<?php echo $group_project_id; ?>" target="_blank"><?php echo _('View Calendar') ?></a>
114 <strong><?php echo _('End Date') ?>:</strong><br />
116 echo $pg->showMonthBox ('end_month',date('m', $pt->getEndDate()));
117 echo $pg->showDayBox ('end_day',date('d', $pt->getEndDate()));
118 echo $pg->showYearBox ('end_year',date('Y', $pt->getEndDate()));
119 echo $pg->showHourBox ('end_hour',date('G', $pt->getEndDate()));
120 echo $pg->showMinuteBox ('end_minute',date('i', $pt->getEndDate()));
127 <strong><?php echo _('Assigned to') ?>:</strong><br />
130 List of possible users that this one could be assigned to
132 echo $pt->multipleAssignedBox ();
136 <td valign="top" colspan="2">
137 <strong><?php echo _('Dependent on task') ?>:</strong><br />
140 List of possible tasks that this one could depend on
143 echo $pt->multipleDependBox();
145 <?php echo _('You should choose only tasks which must be completed before this task can start.') ?>
151 <strong><?php echo _('Estimated Hours') ?>:</strong><br />
152 <input type="text" name="hours" size="5" value="<?php echo $pt->getHours(); ?>" />
156 <strong><?php echo _('Status') ?>:</strong><br />
158 echo $pg->statusBox('status_id', $pt->getStatusID(), false );
162 <input type="hidden" name="duration" value="<?php echo $pt->getDuration(); ?>" />
163 <input type="hidden" name="parent_id" value="<?php echo $pt->getParentID(); ?>" />
165 //will add duration and parent selection boxes
168 <strong><?php echo _('Estimated Hours') ?>:</strong><br />
169 <input type="text" name="hours" size="5" value="<?php echo $pt->getHours(); ?>" />
173 <strong><?php echo _('Status') ?></strong><br />
175 // echo $pg->statusBox('status_id', $pt->getStatusID(), false );
182 <?php echo $pt->showDependentTasks(); ?>
188 <?php echo $pt->showRelatedArtifacts(); ?>
194 <?php echo $pt->showMessages(); ?>
198 $hookParams['task_id']=$project_task_id;
199 plugin_hook("task_extra_detail",$hookParams);
203 <?php echo $pt->showHistory(); ?>
208 <td colspan="3" style="text-align:center">
209 <input type="submit" value="<?php echo _('Submit') ?>" name="submit" />
216 <h3><?php echo _('Time tracking'); ?></h3>
219 $title_arr = array();
220 $title_arr[]=_('Week');
221 $title_arr[]=_('Day');
222 $title_arr[]=_('Estimated Hours');
223 $title_arr[]=_('Category');
224 $title_arr[]=_('User');
227 $report=new Report();
228 if ($report->isError()) {
229 exit_error('Error',$report->getErrorMessage());
232 echo $HTML->listTableTop ($title_arr);
233 echo '<form action="/reporting/timeadd.php" method="post" />
234 <input type="hidden" name="project_task_id" value="'.$project_task_id.'">
235 <input type="hidden" name="submit" value="1" />
236 <tr '.$HTML->boxGetAltRowStyle(@$xi++).'>
237 <td style="text-align:center">'. report_weeks_box($report, 'week') .'</td>
238 <td style="text-align:center">'. report_day_adjust_box($report, 'days_adjust') .'</td>
239 <td style="text-align:center"><input type="text" name="hours" value="" size="3" maxlength="3" /></td>
240 <td style="text-align:center">'.report_time_category_box('time_code',false).'</td>
242 <td style="text-align:center"><input type="submit" name="add" value="'._('Add').'" /><input type="submit" name="cancel" value="'._('Cancel').'" /></td>
245 //setenv("TZ=" . $user_timezone); //restore the user�s timezone
248 // Display Time Recorded for this task
252 $res=db_query_params ('SELECT users.realname, rep_time_tracking.report_date, rep_time_tracking.hours, rep_time_category.category_name
253 FROM users,rep_time_tracking,rep_time_category
255 users.user_id=rep_time_tracking.user_id
256 AND rep_time_tracking.time_code=rep_time_category.time_code
257 AND rep_time_tracking.project_task_id=$1',
258 array($project_task_id));
260 for ($i=0; $i<db_numrows($res); $i++) {
263 <tr '.$HTML->boxGetAltRowStyle($xi++).'>
265 <td>'.date(_('Y-m-d H:i'),db_result($res,$i,'report_date')).'</td>
266 <td>'.db_result($res,$i,'hours').'</td>
267 <td>'.db_result($res,$i,'category_name').'</td>
268 <td>'.db_result($res,$i,'realname').'</td>
269 <td> </td></tr>';
270 $total_hours += db_result($res,$i,'hours');
275 <tr '.$HTML->boxGetAltRowStyle($xi++).'>
276 <td><strong>'._('Total').':</strong></td>
278 <td>'.$total_hours.'</td>
281 <td> </td></tr>';
282 $total_hours += db_result($res,$i,'hours');
284 echo $HTML->listTableBottom();
290 // c-file-style: "bsd"