Exemplo n.º 1
0
 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);
Exemplo n.º 2
0
        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>