Update project.lib.php

This commit is contained in:
Laurent Destailleur 2018-05-25 10:50:16 +02:00 committed by GitHub
parent dd946dd197
commit c56ef86bc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -531,23 +531,26 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
}
print '</td>';
// Ressources
print '<td>';
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'] . ')' . '<br>';
print '<td>';
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'] . ')' . '<br>';
}
}
}
print '</td>';
}
print '</td>';
// 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 '</td>';
print '<td></td>';
print '<td></td>';
// Contacts of task
if (! empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST))
{
print '<td></td>';
}
if ($addordertick) print '<td class="hideonsmartphone"></td>';
print '</tr>';
}