本文整理汇总了PHP中CProject::hasChildProjects方法的典型用法代码示例。如果您正苦于以下问题:PHP CProject::hasChildProjects方法的具体用法?PHP CProject::hasChildProjects怎么用?PHP CProject::hasChildProjects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CProject
的用法示例。
在下文中一共展示了CProject::hasChildProjects方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bestColor
if ($level) {
$s .= '<tr style="display:none" id="multiproject_tr_' . $row['project_original_parent'] . '_' . $row['project_id'] . '_">';
$s .= '<div id="multiproject_' . $row['project_original_parent'] . '_' . $row['project_id'] . '">';
} else {
$s .= '<tr>';
}
$s .= '<td width="65" align="right" style="border: outset #eeeeee 1px;background-color:#' . $row['project_color_identifier'] . '">';
$s .= '<font color="' . bestColor($row['project_color_identifier']) . '">' . sprintf('%.1f%%', $row['project_percent_complete']) . '</font></td>';
$s .= '<td align="center">';
if ($row['project_priority'] < 0) {
$s .= '<img src="' . w2PfindImage('icons/priority-' . -$row['project_priority'] . '.gif') . '" width=13 height=16>';
} elseif ($row['project_priority'] > 0) {
$s .= '<img src="' . w2PfindImage('icons/priority+' . $row['project_priority'] . '.gif') . '" width=13 height=16>';
}
$s .= '</td><td width="40%">';
$count_projects = $tmpProject->hasChildProjects($row['project_id']);
if ($level) {
$s .= str_repeat(' ', $level - 1);
$s .= '<img src="' . w2PfindImage('corner-dots.gif') . '" width="16" height="12" border="0"> ';
$s .= '<a href="./index.php?m=projects&a=view&project_id=' . $row["project_id"] . '">';
$s .= nl2br($row['project_description']) ? w2PtoolTip($row['project_name'], nl2br($row['project_description']), true) : w2PtoolTip($row['project_name'], $AppUI->_('No information available'), true);
$s .= $row["project_name"] . (nl2br($row['project_description']) ? w2PendTip() : '') . '</a>';
} elseif ($count_projects > 0 && !$level) {
$s .= w2PtoolTip($row["project_name"], nl2br($row['project_description']) . '<br />' . '<i>' . $AppUI->_('this project is a parent on a multi-project structure') . '</i><br />' . '<i>' . $AppUI->_('click to show/hide its children') . '</i>');
$s .= '<a href="javascript: void(0);" onclick="expand_collapse(\'multiproject_tr_' . $row["project_id"] . '_\', \'tblProjects\')">';
$s .= '<img id="multiproject_tr_' . $row["project_id"] . '__expand" src="' . w2PfindImage('icons/expand.gif') . '" width="12" height="12" border="0">';
$s .= '<img id="multiproject_tr_' . $row["project_id"] . '__collapse" src="' . w2PfindImage('icons/collapse.gif') . '" width="12" height="12" border="0" style="display:none"></a> ';
$s .= '<a href="./index.php?m=projects&a=view&project_id=' . $row["project_id"] . '">' . (nl2br($row['project_description']) ? w2PtoolTip($row['project_name'], nl2br($row['project_description']), true) : '') . $row['project_name'] . (nl2br($row['project_description']) ? w2PendTip() : '') . '</a>' . w2PendTip();
} else {
$s .= '<a href="./index.php?m=projects&a=view&project_id=' . $row["project_id"] . '">';
$s .= nl2br($row['project_description']) ? w2PtoolTip($row['project_name'], nl2br($row['project_description']), true) : w2PtoolTip($row['project_name'], $AppUI->_('No information available'), true);
示例2: void
echo '</tr>';
}
?>
</table>
</td>
</tr>
<?php
}
?>
</table>
</td>
</tr>
<?php
//lets add the subprojects table
$canReadMultiProjects = $perms->checkModule('admin', 'view');
if ($project->hasChildProjects() && $canReadMultiProjects) {
?>
<tr>
<td colspan="2">
<?php
echo w2PtoolTip('Multiproject', 'Click to Show/Hide Structure', true) . '<a href="javascript: void(0);" onclick="expand_collapse(\'multiproject\', \'tblProjects\')"><img id="multiproject_expand" src="' . w2PfindImage('icons/expand.gif') . '" width="12" height="12" border="0"><img id="multiproject_collapse" src="' . w2PfindImage('icons/collapse.gif') . '" width="12" height="12" border="0" style="display:none"></a> ' . w2PendTip();
echo '<strong>' . $AppUI->_('This Project is Part of the Following Multi-Project Structure') . ':<strong>';
?>
</td>
</tr>
<tr id="multiproject" style="visibility:collapse;display:none;">
<td colspan="2" class="hilite">
<?php
require w2PgetConfig('root_dir') . '/modules/projects/vw_sub_projects.php';
?>
</td>