3 * projects_hierarchyPlugin Class
5 * Copyright 2006 (c) Fabien Regnier - Sogeti
6 * Copyright 2010-2011, Franck Villaume - Capgemini
7 * http://fusionforge.org
9 * This file is part of FusionForge. FusionForge is free software;
10 * you can redistribute it and/or modify it under the terms of the
11 * GNU General Public License as published by the Free Software
12 * Foundation; either version 2 of the Licence, or (at your option)
15 * FusionForge is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License along
21 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 global $g; //group object
26 global $group_id; // id of the group
27 $projectsHierarchy = plugin_get_object('projects-hierarchy');
29 $parent = $projectsHierarchy->getFamily($group_id, 'parent', false, 'validated');
30 $childs = $projectsHierarchy->getFamily($group_id, 'child', false, 'validated');
31 if (sizeof($parent) || sizeof($childs)) {
32 echo $HTML->boxTop(_('Linked projects'));
33 if (sizeof($parent)) {
35 $parentGroup = group_get_object($parent[0]);
36 echo '<li>'._('Parent Project:').' '.util_make_link('/projects/'.$parentGroup->getUnixName(), $parentGroup->getPublicName(), array('class' => 'tabtitle', 'title' => _('Direct link to project'))).'</li>';
39 if (sizeof($childs)) {
44 foreach ($childs as $child) {
45 $childGroup = group_get_object($child[0]);
46 echo '<li>'._('Child project').' '.util_make_link('/projects/'.$childGroup->getUnixName(), $childGroup->getPublicName(), array('class' => 'tabtitle', 'title' => _('Direct link to project'))).'</li>';
51 echo $HTML->boxBottom();