add ressource
This commit is contained in:
parent
f5c245cd19
commit
dd946dd197
@ -332,7 +332,7 @@ function project_admin_prepare_head()
|
||||
*/
|
||||
function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$taskrole, $projectsListId='', $addordertick=0, $projectidfortotallink=0, $filterprogresscalc='')
|
||||
{
|
||||
global $user, $bc, $langs, $conf;
|
||||
global $user, $bc, $langs, $conf, $db;
|
||||
global $projectstatic, $taskstatic;
|
||||
|
||||
$lastprojectid=0;
|
||||
@ -531,6 +531,24 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Ressources
|
||||
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>';
|
||||
|
||||
// Tick to drag and drop
|
||||
if ($addordertick)
|
||||
{
|
||||
@ -579,6 +597,7 @@ 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>';
|
||||
if ($addordertick) print '<td class="hideonsmartphone"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -660,6 +660,8 @@ else if ($id > 0 || ! empty($ref))
|
||||
print '<input class="flat" type="text" size="4" name="search_progressdeclare" value="'.$search_progressdeclare.'">';
|
||||
print '</td>';
|
||||
|
||||
print '<td></td>';
|
||||
|
||||
// Action column
|
||||
print '<td class="liste_titre" align="right">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
@ -677,7 +679,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
print_liste_field_titre("TimeSpent", $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'');
|
||||
print_liste_field_titre("ProgressCalculated", $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'');
|
||||
print_liste_field_titre("ProgressDeclared", $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'');
|
||||
//print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="center" width="80"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print_liste_field_titre("TaskRessourceLinks",$_SERVER["PHP_SELF"],'','','',$sortfield,$sortorder,'');
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"],"",'','','align="center" width="80"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
@ -689,7 +691,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr class="oddeven"><td colspan="9" class="opacitymedium">'.$langs->trans("NoTasks").'</td></tr>';
|
||||
print '<tr class="oddeven"><td colspan="10" class="opacitymedium">'.$langs->trans("NoTasks").'</td></tr>';
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user