예제 #1
0
    $q->addWhere('task_id <> task_parent');
    $row['children'] = $q->loadResult();
    $row['style'] = taskstyle_pd($row);
    $i = count($projects[$row['task_project']]['tasks']) + 1;
    $row['task_number'] = $i;
    $row['node_id'] = 'node_' . $i . '-' . $row['task_id'];
    if (strpos($row['task_duration'], '.') && $row['task_duration_type'] == 1) {
        $row['task_duration'] = floor($row['task_duration']) . ':' . round(60 * ($row['task_duration'] - floor($row['task_duration'])));
    }
    //pull the final task row into array
    $projects[$row['task_project']]['tasks'][] = $row;
}
$showEditCheckbox = isset($canEditTasks) && $canEditTasks || $perms->checkModule('admin', 'view');
$durnTypes = w2PgetSysVal('TaskDurationType');
$tempoTask = new CTask();
$userAlloc = $tempoTask->getAllocation('user_id');
?>
<table width="100%" border="0" cellpadding="1" cellspacing="3" class="prjprint">
<tr class="prjprint">
        <th width="50%"><?php 
echo $AppUI->_('Task Name');
?>
</th>
        <th width="50" nowrap="nowrap"><?php 
echo $AppUI->_('Work');
?>
</th>
        <th nowrap="nowrap"><?php 
echo $AppUI->_('Start');
?>
</th>
예제 #2
0
    $cols--;
}
if ($showEditCheckbox) {
    echo '<th width="1">&nbsp;</th>';
} else {
    $cols--;
}
?>
	</tr>
	<?php 
reset($projects);
if ($w2Pconfig['direct_edit_assignment']) {
    // get Users with all Allocation info (e.g. their freeCapacity)
    // but do it only when direct_edit_assignment is on and only once.
    $tempoTask = new CTask();
    $userAlloc = $tempoTask->getAllocation('user_id', null, true);
}
foreach ($projects as $k => $p) {
    $tnums = isset($p['tasks']) ? count($p['tasks']) : 0;
    if ($tnums > 0 || $project_id == $p['project_id']) {
        //echo '<pre>'; print_r($p); echo '</pre>';
        if (!$min_view) {
            // not minimal view
            $open_link = w2PtoolTip($m, 'Click to Expand/Collapse the Tasks for this Project.') . '<a href="javascript: void(0);"><img onclick="expand_collapse(\'project_' . $p['project_id'] . '_\', \'tblProjects\',\'collapse\',0,2);" id="project_' . $p['project_id'] . '__collapse" src="' . w2PfindImage('up22.png', $m) . '" border="0" width="22" height="22" align="center" ' . (!$expanded ? 'style="display:none"' : '') . ' alt="" /><img onclick="expand_collapse(\'project_' . $p['project_id'] . '_\', \'tblProjects\',\'expand\',0,2);" id="project_' . $p['project_id'] . '__expand" src="' . w2PfindImage('down22.png', $m) . '" border="0" width="22" height="22" align="center" ' . ($expanded ? 'style="display:none"' : '') . ' alt="" /></a>' . w2PendTip();
            ?>
					<tr>
					  <td>
							<form name="assFrm<?php 
            echo $p['project_id'];
            ?>
" action="index.php?m=<?php 
예제 #3
0
	</td>
	<td align="left" nowrap="nowrap">
		<input class="button" type="submit" name="do_report" value="<?php 
echo $AppUI->_('submit');
?>
" />
	</td>
</tr>
</table>
</form>
<?php 
echo $AppUI->_('P') . '&nbsp;=&nbsp;' . $AppUI->_('User specific Task Priority');
if ($do_report) {
    // get Users with all Allocation info (e.g. their freeCapacity)
    $tempoTask = new CTask();
    $userAlloc = $tempoTask->getAllocation("user_id");
    // Let's figure out which users we have
    $sql = new DBQuery();
    $sql->addTable('users');
    $sql->addQuery('user_id, user_username');
    if ($log_userfilter != 0) {
        $sql->addWhere('user_id = ' . $log_userfilter);
    }
    $sql->addOrder('user_username');
    $user_list = $sql->loadHashList('user_id');
    $sql->clear();
    $ss = $start_date->format(FMT_DATETIME_MYSQL);
    $se = $end_date->format(FMT_DATETIME_MYSQL);
    $sql->addTable('tasks', 't');
    $sql->innerJoin('projects', 'p', 'p.project_id = t.task_project');
    if ($log_userfilter != 0) {