diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 67c098210f5..f49e2d50fb2 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -1472,8 +1472,7 @@ class Contact extends CommonObject if ($withpicto == -2) { $result .= ''.Form::showphoto('contact', $this, 0, 0, 0, 'userphoto'.($withpicto == -3 ? 'small' : ''), 'mini', 0, 1).''; }else { - $picto = $this->picto; - $result .= img_object(($notooltip ? '' : $label), ($picto ? $picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + $result .= img_object(($notooltip ? '' : $label), ( $this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); } } if ($withpicto != 2 && $withpicto != -2) { diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 4e2efcecd26..806af682276 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -806,6 +806,28 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t } } + // Contacts of tasks for backward compatibility, + if (!empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) { + 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 ''; + } + // Contacts of task if (count($arrayfields) > 0 && !empty($arrayfields['c.assigned']['checked'])) { print ''; @@ -973,6 +995,10 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t print ''; } } + // Contacts of task for backward compatibility, + if (!empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) { + print ''; + } // Contacts of task if (count($arrayfields) > 0 && !empty($arrayfields['c.assigned']['checked'])) { print ''; diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index ec62952ff30..d75ac2fd906 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -809,6 +809,10 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print ''; } } + // Contacts of task for backward compatibility, + if (!empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) { + print ''; + } if (!empty($arrayfields['c.assigned']['checked'])) { print ''; @@ -865,6 +869,10 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print_liste_field_titre($arrayfields['t.billed']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right '); } } + // Contacts of task for backward compatibility, + if (!empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) { + print_liste_field_titre("TaskRessourceLinks", $_SERVER["PHP_SELF"], '', '', $param, $sortfield, $sortorder); + } if (!empty($arrayfields['c.assigned']['checked'])) { print_liste_field_titre($arrayfields['c.assigned']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ', ''); }