Esempio n. 1
0
</nobr></td>
      <td><?php 
echo $taskInst->hasToPay() ? $lang['common_yes'] : $lang['common_no'];
?>
</td>
    </tr>
  <tr class="light">
    <td><?php 
echo $lang['common_priority'];
?>
</td>
    <td><span class="<?php 
echo $taskInst->getPriorityStyle();
?>
"><?php 
echo $taskInst->getPriorityName();
?>
</span></td>
  </tr><tr class="light">
    <td><?php 
echo $lang['common_type'];
?>
</td>
    <td><span class="<?php 
echo $taskInst->getTypeStyle();
?>
"><?php 
echo $taskInst->getTypeName();
?>
</span></td>
  </tr><tr class="light">
Esempio n. 2
0
        }
        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";
        }
        echo "<td><nobr><a href=\"javascript:openwindow('" . $toolInst->encodeUrl("index.php?content=taskdetails.php&view=details&taskid=" . $id) . "',width='500',height='500')\" title=\"show details for this task\">" . $taskInst->subject . "</a></nobr></td>\n";
        echo "<td><nobr class=" . $taskInst->getPriorityStyle() . ">" . $taskInst->getPriorityName() . "</nobr></td>\n";
        echo "<td><nobr class=" . $taskInst->getStatusStyle() . ">" . $taskInst->getStatusName() . "</nobr></td>\n";
        echo "<td align=\"right\"><nobr>" . $toolInst->formatTime($taskInst->getSummary()) . "</nobr></td>\n";
        echo "<td align=\"right\"><nobr>" . $taskInst->plannedHours . " h</nobr></td>\n";
        if (!$taskInst->isDone()) {
            $percent = $toolInst->numberRound($taskInst->getSummary() * 100 / ($taskInst->plannedHours * 60 * 60), 2);
            $diffHours = $toolInst->formatTime($diff);
            if ($percent > 100) {
                // alert: we've exceeded the scheduled planned hours
                echo "<td align=\"right\" class=\"rmred\">" . $diffHours . "</td>\n";
                echo "<td align=\"right\" class=\"rmred\">" . $percent . " %</td>\n";
            } elseif ($percent > 80) {
                // warn: less than 3 hours left
                echo "<td align=\"right\" class=\"rmyellow\">" . $diffHours . "</td>\n";
                echo "<td align=\"right\" class=\"rmyellow\">" . $percent . " %</td>\n";
            } else {
Esempio n. 3
0
    $taskInst->filterStatusId = TASK_STATUS_DONE;
    $taskInst->filterInvertStatus = 1;
    $taskInst->filterUserId = $loginInst->id;
    $list = $taskInst->getList("priority", "DESC");
    $boxInst = new box();
    $boxInst->setTitle($lang['home_myOpenTasks']);
    $boxInst->setBgColor("#f8f8f8");
    if ($taskInst->matches > 0) {
        $boxInst->addContent("<table border=0 cellpadding=2 cellspacing=0 width=100%>");
        $boxInst->addContent("<tr><th>" . $lang['common_priority'] . "</th><th>" . $lang['common_type'] . "</th><th>" . $lang['common_subject'] . "</th></tr>");
        while ($element = current($list)) {
            $taskInst->activate($element);
            $projectInst = new project($taskInst->projectId);
            if ($projectInst->isAvailable()) {
                $projectInst = new project($taskInst->projectId);
                $boxInst->addContent("<tr><td valign=top class=" . $taskInst->getPriorityStyle() . ">" . $taskInst->getPriorityName() . "</td>");
                $boxInst->addContent("<td valign=top class=" . $taskInst->getTypeStyle() . ">" . $taskInst->getTypeName() . "</td>");
                $boxInst->addContent("<td class=list><a href=\"javascript:openwindow('" . $toolInst->encodeUrl("index.php?content=taskdetails.php&view=details&taskid=" . $element) . "',width='500',height='500')\" title=\"" . $lang['common_showTaskdetails'] . "\">");
                $boxInst->addContent(substr($projectInst->name . ": " . $taskInst->subject, 0, 50));
                $boxInst->addContent("...</a></td></tr>");
            }
            next($list);
        }
        $boxInst->addContent("</table>");
    } else {
        $boxInst->addContent("<b>" . $lang['home_myOpenTasksNoMatches'] . "<br>&nbsp;");
    }
    $boxInst->get();
}
?>
      <br>
Esempio n. 4
0
}
?>
        <tr>
          <td><?php 
echo $lang['common_priority'];
?>
:&nbsp;</td>
          <td><select name="priorityid">
            <?php 
$list = $taskInst->getPriorityList();
while ($element = current($list)) {
    $selected = "";
    if ($element == $taskInst->priorityId) {
        $selected = "selected";
    }
    echo "<option " . $selected . " value=\"" . $element . "\">" . $taskInst->getPriorityName($element) . "\n";
    next($list);
}
?>
          </select></td>
        </tr>
        <tr>
          <td><?php 
echo $lang['common_type'];
?>
:&nbsp;</td>
          <td><select name="typeid">
            <?php 
$list = $taskInst->getTypeList();
while ($element = current($list)) {
    $selected = "";
Esempio n. 5
0
        </tr><tr>
          <td><?php 
echo $lang['common_priority'];
?>
:&nbsp;</td>
          <td><select name="filterpriorityid"><option value=""><?php 
echo $lang['common_notSpecified'];
?>
            <?php 
$list = $taskInst->getPriorityList();
while ($element = current($list)) {
    $selected = "";
    if ($element == tool::securePost('filterpriorityid')) {
        $selected = "selected";
    }
    echo "<option " . $selected . " value=\"" . $element . "\">" . $taskInst->getPriorityName($element) . "\n";
    next($list);
}
?>
          </select></td>
        </tr><tr>
          <td><?php 
echo $lang['common_type'];
?>
:&nbsp;</td>
          <td><select name="filtertypeid"><option value=""><?php 
echo $lang['common_notSpecified'];
?>
            <?php 
$list = $taskInst->getTypeList();
while ($element = current($list)) {