set as global

This commit is contained in:
florian HENRY 2020-03-26 08:24:20 +01:00
parent 81d86f717d
commit 21b98a7c4c
4 changed files with 4 additions and 7 deletions

View File

@ -360,10 +360,7 @@ function project_admin_prepare_head()
function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$taskrole, $projectsListId = '', $addordertick = 0, $projectidfortotallink = 0, $filterprogresscalc = '', $showbilltime = 0, $arrayfields=array())
{
global $user, $langs, $conf, $db, $hookmanager;
global $projectstatic, $taskstatic;
$extrafields = new ExtraFields($db);
$extrafields->fetch_name_optionals_label($taskstatic->table_element);
global $projectstatic, $taskstatic, $extrafields;
$lastprojectid = 0;

View File

@ -8,6 +8,7 @@ if (empty($conf) || ! is_object($conf))
}
if (empty($extrafieldsobjectkey) && is_object($object)) $extrafieldsobjectkey=$object->table_element;
if (!isset($disablesortlink)) $disablesortlink=0;
// Loop to show all columns of extrafields for the title line
if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ...
@ -30,7 +31,7 @@ if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_
{
$tooltip = empty($extrafields->attributes[$extrafieldsobjectkey]['help'][$key]) ? '' : $extrafields->attributes[$extrafieldsobjectkey]['help'][$key];
print getTitleFieldOfList($extrafields->attributes[$extrafieldsobjectkey]['label'][$key], 0, $_SERVER["PHP_SELF"], $sortonfield, "", $param, ($align?'align="'.$align.'" data-titlekey="'.$key.'"':'data-titlekey="'.$key.'"'), $sortfield, $sortorder, '', 0, $tooltip)."\n";
print getTitleFieldOfList($extrafields->attributes[$extrafieldsobjectkey]['label'][$key], 0, $_SERVER["PHP_SELF"], $sortonfield, "", $param, ($align?'align="'.$align.'" data-titlekey="'.$key.'"':'data-titlekey="'.$key.'"'), $sortfield, $sortorder, '', $disablesortlink, $tooltip)."\n";
}
}
}

View File

@ -796,6 +796,7 @@ elseif ($id > 0 || !empty($ref))
}
if (!empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) print_liste_field_titre("TaskRessourceLinks", $_SERVER["PHP_SELF"], '', '', $param, $sortfield, $sortorder);
// Extra fields
$disablesortlink=1;
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);

View File

@ -925,13 +925,11 @@ while ($i < min($num, $limit))
print "</tr>\n";
//print projectLinesa();
}
$i++;
}
// Show total line
//include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
if (isset($totalarray['totaldurationeffectivefield']) || isset($totalarray['totalplannedworkloadfield']) || isset($totalarray['totalprogress_calculatedfield'])
|| isset($totalarray['totaltobill']) || isset($totalarray['totalbilled']))
{