当前位置: 首页>>代码示例>>PHP>>正文


PHP CProject::hasChildProjects方法代码示例

本文整理汇总了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('&nbsp;&nbsp;&nbsp;&nbsp;', $level - 1);
     $s .= '<img src="' . w2PfindImage('corner-dots.gif') . '" width="16" height="12" border="0">&nbsp;';
     $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>&nbsp;';
     $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);
开发者ID:joly,项目名称:web2project,代码行数:31,代码来源:vw_idx_projects.php

示例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>&nbsp;' . 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>
开发者ID:joly,项目名称:web2project,代码行数:31,代码来源:view.php


注:本文中的CProject::hasChildProjects方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。