<input onclick="javascript:checkAll('<?php 
            echo $user_id;
            ?>
');" type="checkbox" name="master" value="true"/>
			</td>
			<td colspan="6" style="background: #D0D0D0;color: #000000;font-weight: bold;" nowrap="nowrap">
				<a href="index.php?m=calendar&amp;a=day_view&amp;user_id=<?php 
            echo $user_id;
            ?>
&amp;tab=1"><?php 
            echo $AppUI->_('Orphaned Tasks');
            ?>
</a>
			</td>
<?php 
            $wx = weekCells($display_week_hours, $sss, $sse);
            for ($w = 0; $w <= $wx; $w++) {
                echo "\t\t\t" . '<td style="background: #D0D0D0;">&nbsp;</td>' . "\n";
            }
            ?>
			<td bgcolor="#D0D0D0">
				<table width="100%"><tr>
					<td align="left">
						<a href="javascript:chAssignment(<?php 
            echo $user_id;
            ?>
, 0, 0);">
						<?php 
            echo dPshowImage(dPfindImage('add.png', 'tasks'), 16, 16, 'Assign Users', 'Assign selected Users to selected Tasks');
            ?>
						</a>
Beispiel #2
0
        if ($display_week_hours) {
            echo weekDates($sss, $sse);
        }
        ?>
		</tr>
<?php 
        foreach ($user_list as $user_id => $user_data) {
            ?>
		<tr>
			<td nowrap="nowrap" style="background: #D0D0D0;color: #000000;font-weight: bold;">
				<?php 
            echo $user_data['contact_first_name'] . ' ' . $user_data['contact_last_name'] . "\n";
            ?>
			</td>
<?php 
            $wx = 2 + ($project_id == 0 ? 1 : 0) + ($display_week_hours ? weekCells($sss, $sse) : 0);
            for ($w = 0; $w < $wx; $w++) {
                ?>
			  <td nowrap="nowrap" style="background: #D0D0D0">&nbsp;</td>
<?php 
            }
            ?>
		</tr>
<?php 
            $actual_date = $start_date;
            foreach ($task_list as $task) {
                if ($task->task_id == $task->task_parent && isMemberOfTask($task_list, $task_assigned_users, $user_id, $task)) {
                    echo displayTask($task_list, $task, 0, $display_week_hours, $sss, $sse, $project_id == 0);
                    // Get children
                    echo doChildren($task_list, $task_assigned_users, $task->task_id, $user_id, 1, $max_levels, $display_week_hours, $sss, $sse, $project_id == 0);
                }
    return false;
}
?>

<center>
	<table width="100%" border="0" cellpadding="2" cellspacing="1" class="std">
		<?php 
echo $table_header . $table_rows;
//show tasks with existing assignees
// show orphaned tasks
if (!$show_orphaned) {
    $user_id = 0;
    //reset user id to zero (create new object - no user)
    $tmpuser = "******"assFrm{$user_id}\" action=\"index.php?m=tasks&a=tasksperuser\" method=\"post\">\n\t\t\t\t<input type=\"hidden\" name=\"del\" value=\"1\" />\n\t\t\t\t<input type=\"hidden\" name=\"rm\" value=\"0\" />\n\t\t\t\t<input type=\"hidden\" name=\"store\" value=\"0\" />\n\t\t\t\t<input type=\"hidden\" name=\"dosql\" value=\"do_task_assign_aed\" />\n\t\t\t\t<input type=\"hidden\" name=\"user_id\" value=\"{$user_id}\" />\n\t\t\t\t<input type=\"hidden\" name=\"hassign\" />\n\t\t\t\t<input type=\"hidden\" name=\"htasks\" />\n\t\t\t\t<tr>";
    $tmpuser .= "<td bgcolor='#D0D0D0'><input onclick=\"javascript:checkAll({$user_id});\" type=\"checkbox\" name=\"master\" value=\"true\"/></td>\n\t\t\t\t<td colspan='2' align='left' nowrap='nowrap' bgcolor='#D0D0D0'>\n\t\t\t\t<font color='black'>\n\t\t\t\t<B>" . $AppUI->_('Orphaned Tasks') . "</B></font></td>";
    for ($w = 0; $w <= 4 + weekCells($display_week_hours, $sss, $sse); $w++) {
        $tmpuser .= "<td bgcolor='#D0D0D0'></td>";
    }
    $tmpuser .= "<td bgcolor=\"#D0D0D0\"><table width=\"100%\"><tr>";
    $tmpuser .= "<td align=\"left\">" . "<a href='javascript:chAssignment({$user_id}, 0, 0);'>" . dPshowImage(dPfindImage('add.png', 'tasks'), 16, 16, 'Assign Users', 'Assign selected Users to selected Tasks') . "</a></td>";
    $tmpuser .= "<td align=\"center\"><select class=\"text\" name=\"percentage_assignment\" title=\"" . $AppUI->_('Assign with Percentage') . "\">";
    for ($i = 0; $i <= 100; $i += 5) {
        $tmpuser .= "<option " . ($i == 30 ? "selected=\"true\"" : "") . " value=\"" . $i . "\">" . $i . "%</option>";
    }
    $tmpuser .= "</select></td>";
    $tmpuser .= "<td align=\"center\">" . arraySelect($taskPriority, 'task_priority', 'onchange="javascript:chPriority(' . $user_id . ');" size="1" class="text" title="' . $AppUI->_('Change Priority of selected Tasks') . '"', 0, true) . "</td>";
    $tmpuser .= "</tr></table></td>";
    $tmpuser .= "</tr>";
    function getOrphanedTasks($tval)
    {
        return sizeof($tval->task_assigned_users) > 0 ? NULL : $tval;
Beispiel #4
0
                    if ($t->task_end_date > $sse) {
                        $sse = $t->task_end_date;
                    }
                }
            }
        }
        $table_header = '
			<tr>
				<th nowrap="nowrap">' . $AppUI->_('Task') . '</td>' . ($project_id == 0 ? '<td nowrap="nowrap">' . $AppUI->_('Project') . '</td>' : '') . '
				<th nowrap="nowrap">' . $AppUI->_('Start Date') . '</th>
				<th nowrap="nowrap">' . $AppUI->_('End Date') . '</th>' . weekDates($display_week_hours, $sss, $sse) . '
			</tr>';
        $table_rows = '';
        foreach ($user_list as $user_id => $user_data) {
            $tmpuser = "******" . $user_data["contact_first_name"] . " " . $user_data['contact_last_name'] . '</td>';
            for ($w = 0; $w <= 1 + ($project_id == 0 ? 1 : 0) + weekCells($display_week_hours, $sss, $sse); $w++) {
                $tmpuser .= '<td bgcolor="#D0D0D0">&nbsp;</td>';
            }
            $tmpuser .= '</tr>';
            $tmptasks = "";
            $actual_date = $start_date;
            foreach ($task_list as $task) {
                if (!isChildTask($task)) {
                    if (isMemberOfTask($task_list, $task_assigned_users, $Ntasks, $user_id, $task)) {
                        $tmptasks .= displayTask($task_list, $task, 0, $display_week_hours, $sss, $sse, !$project_id);
                        // Get children
                        $tmptasks .= doChildren($task_list, $task_assigned_users, $Ntasks, $task->task_id, $user_id, 1, $max_levels, $display_week_hours, $sss, $sse, !$project_id);
                    }
                }
            }
            if ($tmptasks != "") {
if ($show_orphaned == 'on') {
    $user_id = 0;
    //reset user id to zero (create new object - no user)
    $tmpuser = '******' . $user_id . '" action="index.php?m=tasks&a=tasksperuser" method="post" accept-charset="utf-8">
				<input type="hidden" name="del" value="1" />
				<input type="hidden" name="rm" value="0" />
				<input type="hidden" name="store" value="0" />
				<input type="hidden" name="dosql" value="do_task_assign_aed" />
				<input type="hidden" name="user_id" value="' . $user_id . '" />
				<input type="hidden" name="hassign" />
				<input type="hidden" name="htasks" />
				<tr>';
    $tmpuser .= '<td bgcolor="#D0D0D0"><input onclick="javascript:checkAll(' . $user_id . ');" type="checkbox" name="master" value="true"/></td>
				<td colspan="2" align="left" nowrap="nowrap" bgcolor="#D0D0D0">
				<b><a href="index.php?m=events&a=day_view&user_id=' . $user_id . '&tab=1">' . $AppUI->_('Orphaned Tasks') . '</a></b></td>';
    $weekcells_count = weekCells($display_week_hours, $sss, $sse);
    for ($w = 0; $w <= 4 + $weekcells_count; $w++) {
        $tmpuser .= '<td bgcolor="#D0D0D0"></td>';
    }
    $tmpuser .= '<td bgcolor="#D0D0D0"><table width="100%"><tr>';
    $tmpuser .= '<td align="left">' . '<a href="javascript:chAssignment(' . $user_id . ', 0, 0);">' . w2PshowImage('add.png', 16, 16, 'Assign Users', 'Assign selected Users to selected Tasks', 'tasks') . '</a></td>';
    $tmpuser .= '<td align="center"><select class="text" name="percentage_assignment" title="' . $AppUI->_('Assign with Percentage') . '">';
    for ($i = 0; $i <= 100; $i += 5) {
        $tmpuser .= '<option ' . ($i == 30 ? 'selected="true"' : '') . ' value="' . $i . '">' . $i . '%</option>';
    }
    $tmpuser .= '</select></td>';
    $tmpuser .= '<td align="center">' . arraySelect($taskPriority, 'task_priority', 'onchange="javascript:chPriority(' . $user_id . ');" size="1" class="text" title="' . $AppUI->_('Change Priority of selected Tasks') . '"', 0, true);
    $tmpuser .= '</td></tr></table></td>';
    $tmpuser .= '</tr>';
    $orphTasks = array_diff(array_map('getOrphanedTasks', $task_list), array(null));
    $tmptasks = '';
             $sse = $t->task_end_date;
         } else {
             if ($t->task_start_date < $sss) {
                 $sss = $t->task_start_date;
             }
             if ($t->task_end_date > $sse) {
                 $sse = $t->task_end_date;
             }
         }
     }
 }
 $table_header = "<tr>" . "<td nowrap=\"nowrap\" bgcolor='#A0A0A0'><font color='black'><B>" . $AppUI->_("Task") . "</B></font></td>" . ($log_all_projects ? "<td nowrap=\"nowrap\" bgcolor='#A0A0A0'><font color='black'><B>" . $AppUI->_("Project") . "</B></font></td>" : "") . "<td nowrap=\"nowrap\" bgcolor='#A0A0A0'><font color='black'><B>" . $AppUI->_("Start Date") . "</B></font></td>" . "<td nowrap=\"nowrap\" bgcolor='#A0A0A0'><font color='black'><B>" . $AppUI->_("End Date") . "</B></font></td>" . weekDates($display_week_hours, $sss, $sse) . "</tr>";
 $table_rows = "";
 foreach ($user_list as $user_id => $user_data) {
     $tmpuser = "******" . $user_data["contact_first_name"] . " " . $user_data["contact_last_name"] . "</B></font></td>";
     for ($w = 0; $w <= 1 + ($log_all_projects ? 1 : 0) + weekCells($display_week_hours, $sss, $sse); $w++) {
         $tmpuser .= "<td bgcolor='#D0D0D0'></td>";
     }
     $tmpuser .= "</tr>";
     $tmptasks = "";
     $actual_date = $start_date;
     foreach ($task_list as $task) {
         if (!isChildTask($task)) {
             if (isMemberOfTask($task_list, $task_assigned_users, $Ntasks, $user_id, $task)) {
                 $tmptasks .= displayTask($task_list, $task, 0, $display_week_hours, $sss, $sse, $log_all_projects);
                 // Get children
                 $tmptasks .= doChildren($task_list, $task_assigned_users, $Ntasks, $task->task_id, $user_id, 1, $max_levels, $display_week_hours, $sss, $sse, $log_all_projects);
             }
         }
     }
     if ($tmptasks != "") {