當前位置: 首頁>>代碼示例>>PHP>>正文


PHP task::getStatusStyle方法代碼示例

本文整理匯總了PHP中task::getStatusStyle方法的典型用法代碼示例。如果您正苦於以下問題:PHP task::getStatusStyle方法的具體用法?PHP task::getStatusStyle怎麽用?PHP task::getStatusStyle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在task的用法示例。


在下文中一共展示了task::getStatusStyle方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: next

        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 {
                echo "<td align=\"right\" class=\"rmgreen\">" . $diffHours . "</td>\n";
開發者ID:pmtool,項目名稱:pmtool,代碼行數:31,代碼來源:index.php

示例2:

?>
</td>
    <td><span class="<?php 
echo $taskInst->getTypeStyle();
?>
"><?php 
echo $taskInst->getTypeName();
?>
</span></td>
  </tr><tr class="light">
    <td><?php 
echo $lang['common_status'];
?>
</td>
    <td><span class="<?php 
echo $taskInst->getStatusStyle();
?>
"><?php 
echo $taskInst->getStatusName();
?>
</span></td>
  <?php 
if ($taskInst->body != "") {
    ?>
    <tr class="light">
      <td><?php 
    echo $lang['common_body'];
    ?>
</td>
      <td><?php 
    echo ereg_replace("\n", "<br>", $taskInst->body);
開發者ID:pmtool,項目名稱:pmtool,代碼行數:31,代碼來源:taskdetails.php

示例3: project

 // private jobs
 if ($jobInst->matches >= 0 || $fixed) {
     $projectInst = new project($taskInst->projectId);
     // write task details to xml file
     $reportInst->append("  <task>");
     $reportInst->append($toolInst->encodeXml("    <project>" . $projectInst->name . "</project>"));
     $reportInst->append($toolInst->encodeXml("    <subject>" . substr($taskInst->subject, 0, 50) . "</subject>"));
     $reportInst->append($toolInst->encodeXml("    <body>" . substr($taskInst->body, 0, 200) . "</body>"));
     $reportInst->append("    <user>" . $userInst->username . "</user>");
     $reportInst->append("    <time>" . $toolInst->getTime("d.m.Y, H:i", $taskInst->time) . "</time>");
     $reportInst->append("    <priority>" . $taskInst->getPriorityName() . "</priority>");
     $reportInst->append("    <prioritystyle>" . $taskInst->getPriorityStyle() . "</prioritystyle>");
     $reportInst->append("    <type>" . $taskInst->getTypeName() . "</type>");
     $reportInst->append("    <typestyle>" . $taskInst->getTypeStyle() . "</typestyle>");
     $reportInst->append("    <status>" . $taskInst->getStatusName() . "</status>");
     $reportInst->append("    <statusstyle>" . $taskInst->getStatusStyle() . "</statusstyle>");
     echo "<tr class=\"light\">";
     if ($loginInst->hasAccess("report.viewOther")) {
         $userInst = new user($taskInst->userId);
         echo "<td class=list>" . $userInst->username . "</td>";
     }
     echo "<td class=list>" . $projectInst->name . "</td>";
     echo "<td class=list>" . substr($taskInst->subject, 0, 50) . "...</td>";
     echo "<td class=list>";
     if ($taskInst->body) {
         echo substr($taskInst->body, 0, 200) . "...";
     }
     echo "&nbsp;</td>";
     echo "<td class=list><nobr>" . $toolInst->getTime("d.m.Y, H:i", $taskInst->time) . "</nobr></td>";
     echo "<td><nobr class=" . $taskInst->getPriorityStyle() . ">" . $taskInst->getPriorityName() . "</nobr></td>";
     echo "<td><nobr class=" . $taskInst->getTypeStyle() . ">" . $taskInst->getTypeName() . "</nobr></td>";
開發者ID:pmtool,項目名稱:pmtool,代碼行數:31,代碼來源:reports.php


注:本文中的task::getStatusStyle方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。