3 * GForge Project Management Facility
5 * Copyright 2002 GForge, LLC
13 By Tim Perdue, Sourceforge, 11/99
14 Heavy rewrite by Tim Perdue April 2000
16 Total rewrite in OO and GForge coding guidelines 12/2002 by Tim Perdue
19 require_once('note.php');
20 require_once('common/reporting/report_utils.php');
21 require_once('common/reporting/Report.class');
24 if ($report->isError()) {
25 exit_error('Error',$report->getErrorMessage());
29 pm_header(array('title'=>$Language->getText('pm_modtask','title'),'group_project_id'=>$group_project_id));
33 <form action="<?php echo "$PHP_SELF?group_id=$group_id&group_project_id=$group_project_id"; ?>" method="post">
34 <input type="hidden" name="func" value="postmodtask" />
35 <input type="hidden" name="project_task_id" value="<?php echo $project_task_id; ?>" />
37 <table border="0" width="100%">
40 <td><strong><?php echo $Language->getText('pm_modtask','submitted_by') ?>:</strong><br />
41 <?php echo $pt->getSubmittedRealName(); ?> (<?php echo $pt->getSubmittedUnixName(); ?>)</td>
42 <td><input type="submit" value="<?php echo $Language->getText('general','submit') ?>" name="submit" /></td>
47 <strong><?php echo $Language->getText('pm','category') ?>:</strong><br />
48 <?php echo $pg->categoryBox('category_id',$pt->getCategoryID()); ?> <a href="/pm/admin/?<?php echo "group_id=$group_id&add_cat=1&group_project_id=$group_project_id"; ?>">(admin)</a>
52 <strong><?php echo $Language->getText('pm_detailtask','subproject'); ?>:</strong><br />
53 <?php echo $pg->groupProjectBox('new_group_project_id',$group_project_id,false); ?>
59 <strong><?php echo $Language->getText('pm','percent_complete') ?>:</strong><br />
60 <?php echo $pg->percentCompleteBox('percent_complete',$pt->getPercentComplete()); ?>
64 <strong><?php echo $Language->getText('pm','priority') ?>:</strong><br />
65 <?php echo build_priority_select_box('priority',$pt->getPriority()); ?>
74 <strong><?php echo $Language->getText('pm','summary') ?>:</strong><br />
75 <input type="text" name="summary" size="40" maxlength="65" value="<?php echo $pt->getSummary(); ?>" />
81 <strong><?php echo $Language->getText('pm_modtask','original_comment') ?>:</strong><br />
82 <?php echo nl2br( $pt->getDetails() ); ?>
84 <strong><?php echo $Language->getText('pm_modtask','add_comment') ?>:</strong><?php echo notepad_button('document.forms[1].details') ?><br />
85 <textarea name="details" rows="5" cols="40" wrap="soft"></textarea>
91 <strong><?php echo $Language->getText('pm','start_date') ?>:</strong><br />
93 echo $pg->showMonthBox ('start_month',date('m', $pt->getStartDate()));
94 echo $pg->showDayBox ('start_day',date('d', $pt->getStartDate()));
95 echo $pg->showYearBox ('start_year',date('Y', $pt->getStartDate()));
96 echo $pg->showHourBox ('start_hour',date('G', $pt->getStartDate()));
97 echo $pg->showMinuteBox ('start_minute',date('i',$pt->getStartDate()));
98 ?><br /><?php echo $Language->getText('pm','date_note') ?>
99 <br /><a href="calendar.php?group_id=<?php echo $group_id; ?>&group_project_id=<?php echo $group_project_id; ?>" target="_blank"><?php echo $Language->getText('pm','view_calendar') ?></a>
105 <strong><?php echo $Language->getText('pm','end_date') ?>:</strong><br />
107 echo $pg->showMonthBox ('end_month',date('m', $pt->getEndDate()));
108 echo $pg->showDayBox ('end_day',date('d', $pt->getEndDate()));
109 echo $pg->showYearBox ('end_year',date('Y', $pt->getEndDate()));
110 echo $pg->showHourBox ('end_hour',date('G', $pt->getEndDate()));
111 echo $pg->showMinuteBox ('end_minute',date('i', $pt->getEndDate()));
118 <strong><?php echo $Language->getText('pm','assigned_to') ?>:</strong><br />
121 List of possible users that this one could be assigned to
123 echo $pt->multipleAssignedBox ();
128 <strong><?php echo $Language->getText('pm','dependent') ?>:</strong><br />
131 List of possible tasks that this one could depend on
134 echo $pt->multipleDependBox();
136 <?php echo $Language->getText('pm','dependent_note') ?>
142 <strong><?php echo $Language->getText('pm','hours') ?>:</strong><br />
143 <input type="text" name="hours" size="5" value="<?php echo $pt->getHours(); ?>" />
147 <strong><?php echo $Language->getText('pm','status') ?>:</strong><br />
149 echo $pg->statusBox('status_id', $pt->getStatusID(), false );
153 <input type="hidden" name="duration" value="<?php echo $pt->getDuration(); ?>">
154 <input type="hidden" name="parent_id" value="<?php echo $pt->getParentID(); ?>">
156 //will add duration and parent selection boxes
159 <strong><?php echo $Language->getText('pm','hours') ?>:</strong><br />
160 <input type="text" name="hours" size="5" value="<?php echo $pt->getHours(); ?>" />
164 <strong><?php echo $Language->getText('pm','status') ?>:</strong><br />
166 // echo $pg->statusBox('status_id', $pt->getStatusID(), false );
173 <?php echo $pt->showDependentTasks(); ?>
179 <?php echo $pt->showRelatedArtifacts(); ?>
185 <?php echo $pt->showMessages(); ?>
189 $hookParams['task_id']=$project_task_id;
190 plugin_hook("task_extra_detail",$hookParams);
194 <?php echo $pt->showHistory(); ?>
199 <td colspan="2" align="center">
200 <input type="submit" value="<?php echo $Language->getText('general','submit') ?>" name="submit" />
207 <h3>Time Tracking</h3>
212 $title_arr[]='Hours';
213 $title_arr[]='Category';
217 echo $HTML->listTableTop ($title_arr);
218 echo '<form action="/reporting/timeadd.php" method="post" />
219 <input type="hidden" name="project_task_id" value="'.$project_task_id.'">
220 <input type="hidden" name="submit" value="1" />
221 <tr '.$HTML->boxGetAltRowStyle($xi++).'>
222 <td align="middle">'. report_weeks_box($report, 'week') .'</td>
223 <td align="middle">'. report_day_adjust_box($report, 'days_adjust') .'</td>
224 <td align="middle"><input type="text" name="hours" value="" size="3" maxlength="3" /></td>
225 <td align="middle">'.report_time_category_box('time_code',false).'</td>
227 <td align="middle"><input type="submit" name="add" value="Add" /><input type="submit" name="cancel" value="Cancel" /></td>
231 // Display Time Recorded for this task
233 $sql="SELECT users.realname, rep_time_tracking.report_date, rep_time_tracking.hours, rep_time_category.category_name
234 FROM users,rep_time_tracking,rep_time_category
236 users.user_id=rep_time_tracking.user_id
237 AND rep_time_tracking.time_code=rep_time_category.time_code
238 AND rep_time_tracking.project_task_id='$project_task_id'";
241 for ($i=0; $i<db_numrows($res); $i++) {
244 <tr '.$HTML->boxGetAltRowStyle($xi++).'>
246 <td>'.date($sys_datefmt,db_result($res,$i,'report_date')).'</td>
247 <td>'.db_result($res,$i,'hours').'</td>
248 <td>'.db_result($res,$i,'category_name').'</td>
249 <td>'.db_result($res,$i,'realname').'</td>
250 <td> </td></tr>';
251 $total_hours += db_result($res,$i,'hours');
256 <tr '.$HTML->boxGetAltRowStyle($xi++).'>
257 <td><strong>Total:</strong></td>
259 <td>'.$total_hours.'</td>
262 <td> </td></tr>';
263 $total_hours += db_result($res,$i,'hours');
265 echo $HTML->listTableBottom();
271 // c-file-style: "bsd"