diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 99e9055c6a3..e11fd409a6e 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -531,23 +531,26 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t } print ''; - // Ressources - print ''; - foreach(array('internal','external') as $source) + // Contacts of task + if (! empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) { - $tab = $lines[$i]->liste_contact(-1,$source); - $num=count($tab); - if (!empty($num)){ - foreach ($tab as $contacttask){ - //var_dump($contacttask); - if ($source == 'internal') $c = new User($db); - else $c = new Contact($db); - $c->fetch($contacttask['id']); - print $c->getNomUrl(1) . ' (' . $contacttask['libelle'] . ')' . '
'; + print ''; + foreach(array('internal','external') as $source) + { + $tab = $lines[$i]->liste_contact(-1,$source); + $num=count($tab); + if (!empty($num)){ + foreach ($tab as $contacttask){ + //var_dump($contacttask); + if ($source == 'internal') $c = new User($db); + else $c = new Contact($db); + $c->fetch($contacttask['id']); + print $c->getNomUrl(1) . ' (' . $contacttask['libelle'] . ')' . '
'; + } } } + print ''; } - print ''; // Tick to drag and drop if ($addordertick) @@ -597,7 +600,11 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t if ($total_projectlinesa_planned) print round(100 * $total_projectlinesa_spent / $total_projectlinesa_planned,2).' %'; print ''; print ''; - print ''; + // Contacts of task + if (! empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) + { + print ''; + } if ($addordertick) print ''; print ''; }