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>
42 <strong><?php echo _('Category') ?></strong><br />
43 <?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')); ?>
47 <strong><?php echo _('Subproject'); ?>:</strong><br />
48 <?php echo $pg->groupProjectBox('new_group_project_id',$group_project_id,false); ?>
54 <strong><?php echo _('Percent Complete') ?>:</strong><br />
55 <?php echo $pg->percentCompleteBox('percent_complete',$pt->getPercentComplete()); ?>
59 <strong><?php echo _('Priority') ?>:</strong><br />
60 <?php echo build_priority_select_box('priority',$pt->getPriority()); ?>
66 <strong><?php echo _('Task Summary') ?>:</strong><br />
67 <input type="text" name="summary" size="65" maxlength="65" value="<?php echo $pt->getSummary(); ?>" />
70 <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>
76 <strong><?php echo _('Original Comment') ?>:</strong><br />
77 <?php echo nl2br( $pt->getDetails() ); ?>
79 <strong><?php echo _('Add A Comment') ?>:</strong><?php echo notepad_button('document.forms.modtaskform.details') ?><br />
80 <textarea name="details" rows="5" cols="80"></textarea>
86 <strong><?php echo _('Start Date') ?>:</strong><br />
88 echo $pg->showMonthBox ('start_month',date('m', $pt->getStartDate()));
89 echo $pg->showDayBox ('start_day',date('d', $pt->getStartDate()));
90 echo $pg->showYearBox ('start_year',date('Y', $pt->getStartDate()));
91 echo $pg->showHourBox ('start_hour',date('G', $pt->getStartDate()));
92 echo $pg->showMinuteBox ('start_minute',date('i',$pt->getStartDate()));
93 ?><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.') ?>
94 <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>
100 <strong><?php echo _('End Date') ?>:</strong><br />
102 echo $pg->showMonthBox ('end_month',date('m', $pt->getEndDate()));
103 echo $pg->showDayBox ('end_day',date('d', $pt->getEndDate()));
104 echo $pg->showYearBox ('end_year',date('Y', $pt->getEndDate()));
105 echo $pg->showHourBox ('end_hour',date('G', $pt->getEndDate()));
106 echo $pg->showMinuteBox ('end_minute',date('i', $pt->getEndDate()));
113 <strong><?php echo _('Assigned to') ?>:</strong><br />
116 List of possible users that this one could be assigned to
118 echo $pt->multipleAssignedBox ();
123 <strong><?php echo _('Dependent on task') ?>:</strong><br />
126 List of possible tasks that this one could depend on
129 echo $pt->multipleDependBox();
131 <?php echo _('You should choose only tasks which must be completed before this task can start.') ?>
137 <strong><?php echo _('Estimated Hours') ?>:</strong><br />
138 <input type="text" name="hours" size="5" value="<?php echo $pt->getHours(); ?>" />
142 <strong><?php echo _('Status') ?>:</strong><br />
144 echo $pg->statusBox('status_id', $pt->getStatusID(), false );
148 <input type="hidden" name="duration" value="<?php echo $pt->getDuration(); ?>" />
149 <input type="hidden" name="parent_id" value="<?php echo $pt->getParentID(); ?>" />
151 //will add duration and parent selection boxes
154 <strong><?php echo _('Estimated Hours') ?>:</strong><br />
155 <input type="text" name="hours" size="5" value="<?php echo $pt->getHours(); ?>" />
159 <strong><?php echo _('Status') ?></strong><br />
161 // echo $pg->statusBox('status_id', $pt->getStatusID(), false );
168 <?php echo $pt->showDependentTasks(); ?>
174 <?php echo $pt->showRelatedArtifacts(); ?>
180 <?php echo $pt->showMessages(); ?>
184 $hookParams['task_id']=$project_task_id;
185 plugin_hook("task_extra_detail",$hookParams);
189 <?php echo $pt->showHistory(); ?>
194 <td colspan="2" style="text-align:center">
195 <input type="submit" value="<?php echo _('Submit') ?>" name="submit" />
202 <h3><?php echo _('Time tracking'); ?></h3>
205 $title_arr = array();
206 $title_arr[]=_('Week');
207 $title_arr[]=_('Day');
208 $title_arr[]=_('Estimated Hours');
209 $title_arr[]=_('Category');
210 $title_arr[]=_('User');
213 $report=new Report();
214 if ($report->isError()) {
215 exit_error('Error',$report->getErrorMessage());
218 echo $HTML->listTableTop ($title_arr);
219 echo '<form action="/reporting/timeadd.php" method="post" />
220 <input type="hidden" name="project_task_id" value="'.$project_task_id.'">
221 <input type="hidden" name="submit" value="1" />
222 <tr '.$HTML->boxGetAltRowStyle(@$xi++).'>
223 <td style="text-align:center">'. report_weeks_box($report, 'week') .'</td>
224 <td style="text-align:center">'. report_day_adjust_box($report, 'days_adjust') .'</td>
225 <td style="text-align:center"><input type="text" name="hours" value="" size="3" maxlength="3" /></td>
226 <td style="text-align:center">'.report_time_category_box('time_code',false).'</td>
228 <td style="text-align:center"><input type="submit" name="add" value="'._('Add').'" /><input type="submit" name="cancel" value="'._('Cancel').'" /></td>
231 //setenv("TZ=" . $user_timezone); //restore the user�s timezone
234 // Display Time Recorded for this task
238 $res=db_query_params ('SELECT users.realname, rep_time_tracking.report_date, rep_time_tracking.hours, rep_time_category.category_name
239 FROM users,rep_time_tracking,rep_time_category
241 users.user_id=rep_time_tracking.user_id
242 AND rep_time_tracking.time_code=rep_time_category.time_code
243 AND rep_time_tracking.project_task_id=$1',
244 array($project_task_id));
246 for ($i=0; $i<db_numrows($res); $i++) {
249 <tr '.$HTML->boxGetAltRowStyle($xi++).'>
251 <td>'.date(_('Y-m-d H:i'),db_result($res,$i,'report_date')).'</td>
252 <td>'.db_result($res,$i,'hours').'</td>
253 <td>'.db_result($res,$i,'category_name').'</td>
254 <td>'.db_result($res,$i,'realname').'</td>
255 <td> </td></tr>';
256 $total_hours += db_result($res,$i,'hours');
261 <tr '.$HTML->boxGetAltRowStyle($xi++).'>
262 <td><strong>'._('Total').':</strong></td>
264 <td>'.$total_hours.'</td>
267 <td> </td></tr>';
268 $total_hours += db_result($res,$i,'hours');
270 echo $HTML->listTableBottom();
276 // c-file-style: "bsd"