예제 #1
0
echo $AppUI->_('Cost Code');
?>
</th>
	<th width="100%"><?php 
echo $AppUI->_('Comments');
?>
</th>
	<th></th>
</tr>
<?php 
// Winnow out the tasks we are not allowed to view.
$perms =& $AppUI->acl();
$canDelete = $perms->checkModule('task_log', 'delete');
// Pull the task comments
$project = new CProject();
$logs = $project->getTaskLogs($AppUI, $project_id, $user_id, $hide_inactive, $hide_complete, $cost_code);
$s = '';
$hrs = 0;
$canEdit = $perms->checkModule('task_log', 'edit');
foreach ($logs as $row) {
    $task_log_date = intval($row['task_log_date']) ? new CDate($row['task_log_date']) : null;
    $s .= '<tr bgcolor="white" valign="top"><td>';
    if ($canEdit) {
        $s .= '<a href="?m=tasks&a=view&task_id=' . $row['task_id'] . '&tab=1&task_log_id=' . $row['task_log_id'] . '">' . w2PshowImage('icons/stock_edit-16.png', 16, 16, '') . "\n\t\t</a>";
    }
    $s .= '</td><td nowrap="nowrap">' . ($task_log_date ? $task_log_date->format($df) : '-') . '</td>';
    $s .= '<td width="30%"><a href="?m=tasks&a=view&task_id=' . $row['task_id'] . '&tab=0">' . $row['task_log_name'] . '</a></td>';
    $s .= '<td width="100">' . $row['real_name'] . '</td>';
    $s .= '<td width="100" align="right">' . sprintf('%.2f', $row['task_log_hours']) . '</td>';
    $s .= '<td width="100">' . $row['task_log_costcode'] . '</td><td>';
    // dylan_cuthbert: auto-transation system in-progress, leave these lines