Esempio n. 1
0
 /**
  * checks whether an existing parent task is set to done
  * @return true if parent task is done, otherwise false
  */
 function isParentDone()
 {
     if (!isset($this->mountId) || $this->mountId == 0) {
         return true;
     }
     $task = new task($this->mountId);
     if ($task->isDone()) {
         return true;
     }
     return false;
 }
Esempio n. 2
0
      </table>
    </td>
  </tr>
  </form>
</table>

<?php 
#######################################################################
## show form to post jobs
if ($status == 0) {
    $jobInst->clear();
}
?>

<?php 
if (!$taskInst->isDone() && $loginInst->id == $taskInst->userId) {
    ?>
  <br>
  <a name="jobform"></a>
  <form method="post" name="form1">
  <input type="hidden" name="action" value="save">
  <input type="hidden" name="taskid" value="<?php 
    echo $taskInst->id;
    ?>
">
  <input type="hidden" name="id" value="<?php 
    echo $jobInst->id;
    ?>
">
  <table border="0" cellpadding="2" cellspacing="1" width="96%" bgcolor="#ffffff">
    <tr>
Esempio n. 3
0
    <th>percentage</th>
    <th>&nbsp;</th>
  </tr>

<?php 
$taskInst = new task();
$order = "finish";
if (tool::securePost('order')) {
    $order = tool::securePost('order');
}
$list = $taskInst->getList($order);
if ($order == "plannedhours") {
    $listByHour = array();
    while ($element = current($list)) {
        $taskInst->activate($element);
        if (!$taskInst->isDone() && $taskInst->statusId != TASK_STATUS_WAITING && $taskInst->plannedHours && $taskInst->plannedHours != "0") {
            $diff = $taskInst->plannedHours * 60 * 60 - $taskInst->getSummary();
            $listByHour[$diff] = $taskInst->id;
        }
        next($list);
    }
    ksort($listByHour);
    while (list($diff, $id) = each($listByHour)) {
        $taskInst->activate($id);
        ?>
<tr class="light" onmouseover="this.style.backgroundColor='#fafafa'" onmouseout="this.style.backgroundColor=''"><?php 
        $projectInst = new project($taskInst->projectId);
        echo "<td><nobr><a href=\"javascript:openwindow('" . $toolInst->encodeUrl("index.php?content=projectdetails.php&view=details&projectid=" . $projectInst->id) . "',width='500',height='500')\" title=\"show details for this project\">" . $projectInst->name . "</a></nobr></td>\n";
        if ($loginInst->hasAccess("task.viewOther")) {
            $userInst = new user($taskInst->userId);
            echo "<td><nobr>" . $userInst->username . "</nobr></td>\n";