* Copyright 2002 GForge, LLC
* http://gforge.org/
*
- * @version $Id$
*/
/*
Total rewrite in OO and GForge coding guidelines 12/2002 by Tim Perdue
*/
-require_once('note.php');
-require_once('common/reporting/report_utils.php');
-require_once('common/reporting/Report.class');
+require_once $gfwww.'include/note.php';
+require_once $gfcommon.'reporting/report_utils.php';
+require_once $gfcommon.'reporting/Report.class.php';
-$report=new Report();
-if ($report->isError()) {
- exit_error('Error',$report->getErrorMessage());
-}
-echo notepad_func();
+pm_header(array('title'=>_('Modify Task'),'pagename'=>'pm_modtask','group_project_id'=>$group_project_id));
-pm_header(array('title'=>$Language->getText('pm_modtask','title'),'pagename'=>'pm_modtask','group_project_id'=>$group_project_id));
+echo notepad_func();
?>
<input type="hidden" name="func" value="postmodtask" />
<input type="hidden" name="project_task_id" value="<?php echo $project_task_id; ?>" />
-<table border="0" width="100%">
+<table border="0" width="100%" class="mod_task">
<tr>
- <td><strong><?php echo $Language->getText('pm_modtask','submitted_by') ?>:</strong><br />
+ <td><strong><?php echo _('Submitted by') ?>:</strong><br />
<?php echo $pt->getSubmittedRealName(); ?> (<?php echo $pt->getSubmittedUnixName(); ?>)</td>
- <td><input type="submit" value="<?php echo $Language->getText('general','submit') ?>" name="submit" /></td>
+ <td><input type="submit" value="<?php echo _('Submit') ?>" name="submit" /></td>
</tr>
<tr>
<td>
- <strong><?php echo $Language->getText('pm','category') ?>:</strong><br />
- <?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>
+ <strong><?php echo _('Category') ?></strong><br />
+ <?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')); ?>
</td>
<td>
- <strong><?php echo $Language->getText('pm_detailtask','subproject'); ?>:</strong><br />
+ <strong><?php echo _('Subproject'); ?>:</strong><br />
<?php echo $pg->groupProjectBox('new_group_project_id',$group_project_id,false); ?>
</td>
</tr>
<tr>
<td>
- <strong><?php echo $Language->getText('pm','percent_complete') ?>:</strong><br />
+ <strong><?php echo _('Percent Complete') ?>:</strong><br />
<?php echo $pg->percentCompleteBox('percent_complete',$pt->getPercentComplete()); ?>
</td>
<td>
- <strong><?php echo $Language->getText('pm','priority') ?>:</strong><br />
+ <strong><?php echo _('Priority') ?>:</strong><br />
<?php echo build_priority_select_box('priority',$pt->getPriority()); ?>
</td>
</tr>
<tr>
<td>
- <strong><?php echo $Language->getText('pm','summary') ?>:</strong><br />
- <input type="text" name="summary" size="40" maxlength="65" value="<?php echo $pt->getSummary(); ?>" />
+ <strong><?php echo _('Task Summary') ?>:</strong><br />
+ <input type="text" name="summary" size="65" maxlength="65" value="<?php echo $pt->getSummary(); ?>" />
</td>
<td>
- <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 $Language->getText('pm_deletetask','delete') ?></a>
+ <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>
</td>
</tr>
<tr>
<td colspan="2">
- <strong><?php echo $Language->getText('pm_modtask','original_comment') ?>:</strong><br />
+ <strong><?php echo _('Original Comment') ?>:</strong><br />
<?php echo nl2br( $pt->getDetails() ); ?>
<p />
- <strong><?php echo $Language->getText('pm_modtask','add_comment') ?>:</strong><?php echo notepad_button('document.forms[1].details') ?><br />
- <textarea name="details" rows="5" cols="40" wrap="soft"></textarea>
+ <strong><?php echo _('Add A Comment') ?>:</strong><?php echo notepad_button('document.forms[2].details') ?><br />
+ <textarea name="details" rows="5" cols="80"></textarea>
</td>
</tr>
<tr>
<td colspan="2">
- <strong><?php echo $Language->getText('pm','start_date') ?>:</strong><br />
+ <strong><?php echo _('Start Date') ?>:</strong><br />
<?php
echo $pg->showMonthBox ('start_month',date('m', $pt->getStartDate()));
echo $pg->showDayBox ('start_day',date('d', $pt->getStartDate()));
echo $pg->showYearBox ('start_year',date('Y', $pt->getStartDate()));
echo $pg->showHourBox ('start_hour',date('G', $pt->getStartDate()));
echo $pg->showMinuteBox ('start_minute',date('i',$pt->getStartDate()));
- ?><br /><?php echo $Language->getText('pm','date_note') ?>
- <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>
+ ?><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.') ?>
+ <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>
</td>
</tr>
<tr>
<td colspan="2">
- <strong><?php echo $Language->getText('pm','end_date') ?>:</strong><br />
+ <strong><?php echo _('End Date') ?>:</strong><br />
<?php
echo $pg->showMonthBox ('end_month',date('m', $pt->getEndDate()));
echo $pg->showDayBox ('end_day',date('d', $pt->getEndDate()));
<tr>
<td valign="top">
- <strong><?php echo $Language->getText('pm','assigned_to') ?>:</strong><br />
+ <strong><?php echo _('Assigned to') ?>:</strong><br />
<?php
/*
List of possible users that this one could be assigned to
</td>
<td valign="top">
- <strong><?php echo $Language->getText('pm','dependent') ?>:</strong><br />
+ <strong><?php echo _('Dependent on task') ?>:</strong><br />
<?php
/*
List of possible tasks that this one could depend on
echo $pt->multipleDependBox();
?><br />
- <?php echo $Language->getText('pm','dependent_note') ?>
+ <?php echo _('You should choose only tasks which must be completed before this task can start.') ?>
</td>
</tr>
<tr>
<td>
- <strong><?php echo $Language->getText('pm','hours') ?>:</strong><br />
+ <strong><?php echo _('Estimated Hours') ?>:</strong><br />
<input type="text" name="hours" size="5" value="<?php echo $pt->getHours(); ?>" />
</td>
<td>
- <strong><?php echo $Language->getText('pm','status') ?>:</strong><br />
+ <strong><?php echo _('Status') ?>:</strong><br />
<?php
echo $pg->statusBox('status_id', $pt->getStatusID(), false );
?>
</td>
</tr>
- <input type="hidden" name="duration" value="<?php echo $pt->getDuration(); ?>">
- <input type="hidden" name="parent_id" value="<?php echo $pt->getParentID(); ?>">
+ <input type="hidden" name="duration" value="<?php echo $pt->getDuration(); ?>" />
+ <input type="hidden" name="parent_id" value="<?php echo $pt->getParentID(); ?>" />
<!--
//will add duration and parent selection boxes
<tr>
<td>
- <strong><?php echo $Language->getText('pm','hours') ?>:</strong><br />
+ <strong><?php echo _('Estimated Hours') ?>:</strong><br />
<input type="text" name="hours" size="5" value="<?php echo $pt->getHours(); ?>" />
</td>
<td>
- <strong><?php echo $Language->getText('pm','status') ?>:</strong><br />
+ <strong><?php echo _('Status') ?></strong><br />
<?php
// echo $pg->statusBox('status_id', $pt->getStatusID(), false );
?>
</tr>
<tr>
- <td colspan="2" align="center">
- <input type="submit" value="<?php echo $Language->getText('general','submit') ?>" name="submit" />
+ <td colspan="2" style="text-align:center">
+ <input type="submit" value="<?php echo _('Submit') ?>" name="submit" />
</td>
</tr>
</table>
</form>
-<p>
-<h3><?php echo $Language->getText('pm_modtask', 'time_tracking'); ?></h3>
-<p>
+
+<h3><?php echo _('Time tracking'); ?></h3>
+
<?php
$title_arr = array();
-$title_arr[]=$Language->getText('pm', 'week');
-$title_arr[]=$Language->getText('pm', 'day');
-$title_arr[]=$Language->getText('pm', 'hours');
-$title_arr[]=$Language->getText('pm', 'category');
-$title_arr[]=$Language->getText('pm', 'user');
+$title_arr[]=_('Week');
+$title_arr[]=_('Day');
+$title_arr[]=_('Estimated Hours');
+$title_arr[]=_('Category');
+$title_arr[]=_('User');
$title_arr[]=' ';
+$report=new Report();
+if ($report->isError()) {
+ exit_error('Error',$report->getErrorMessage());
+}
+
echo $HTML->listTableTop ($title_arr);
echo '<form action="/reporting/timeadd.php" method="post" />
<input type="hidden" name="project_task_id" value="'.$project_task_id.'">
<input type="hidden" name="submit" value="1" />
- <tr '.$HTML->boxGetAltRowStyle($xi++).'>
- <td align="middle">'. report_weeks_box($report, 'week') .'</td>
- <td align="middle">'. report_day_adjust_box($report, 'days_adjust') .'</td>
- <td align="middle"><input type="text" name="hours" value="" size="3" maxlength="3" /></td>
- <td align="middle">'.report_time_category_box('time_code',false).'</td>
+ <tr '.$HTML->boxGetAltRowStyle(@$xi++).'>
+ <td style="text-align:center">'. report_weeks_box($report, 'week') .'</td>
+ <td style="text-align:center">'. report_day_adjust_box($report, 'days_adjust') .'</td>
+ <td style="text-align:center"><input type="text" name="hours" value="" size="3" maxlength="3" /></td>
+ <td style="text-align:center">'.report_time_category_box('time_code',false).'</td>
<td> </td>
- <td align="middle"><input type="submit" name="add" value="'.$Language->getText('general','add').'" /><input type="submit" name="cancel" value="'.$Language->getText('general','cancel').'" /></td>
+ <td style="text-align:center"><input type="submit" name="add" value="'._('Add').'" /><input type="submit" name="cancel" value="'._('Cancel').'" /></td>
</tr></form>';
-
+
+//setenv("TZ=" . $user_timezone); //restore the user�s timezone
+
//
// Display Time Recorded for this task
//
-$sql="SELECT users.realname, rep_time_tracking.report_date, rep_time_tracking.hours, rep_time_category.category_name
+
+
+$res=db_query_params ('SELECT users.realname, rep_time_tracking.report_date, rep_time_tracking.hours, rep_time_category.category_name
FROM users,rep_time_tracking,rep_time_category
WHERE
users.user_id=rep_time_tracking.user_id
AND rep_time_tracking.time_code=rep_time_category.time_code
- AND rep_time_tracking.project_task_id='$project_task_id'";
-
-$res=db_query($sql);
+ AND rep_time_tracking.project_task_id=$1',
+ array($project_task_id));
+$total_hours =0;
for ($i=0; $i<db_numrows($res); $i++) {
echo '
<tr '.$HTML->boxGetAltRowStyle($xi++).'>
<td> </td>
- <td>'.date($sys_datefmt,db_result($res,$i,'report_date')).'</td>
+ <td>'.date(_('Y-m-d H:i'),db_result($res,$i,'report_date')).'</td>
<td>'.db_result($res,$i,'hours').'</td>
<td>'.db_result($res,$i,'category_name').'</td>
<td>'.db_result($res,$i,'realname').'</td>
echo '
<tr '.$HTML->boxGetAltRowStyle($xi++).'>
-<td><strong>'.$Language->getText('pm', 'total').':</strong></td>
+<td><strong>'._('Total').':</strong></td>
<td> </td>
<td>'.$total_hours.'</td>
<td> </td>