diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 4e0d3da467e..5bee2f31dd4 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -700,11 +700,14 @@ class FormOther print ' selected'; } - $labeltoshow = $langs->trans("Project").' '.$lines[$i]->projectref; + $labeltoshow = $lines[$i]->projectref; + //$labeltoshow .= ' '.$lines[$i]->projectlabel; if (empty($lines[$i]->public)) { - $labeltoshow .= ' ('.$langs->trans("Visibility").': '.$langs->trans("PrivateProject").')'; + //$labeltoshow .= ' ('.$langs->trans("Visibility").': '.$langs->trans("PrivateProject").')'; + $labeltoshow = img_picto($lines[$i]->projectlabel, 'project', 'class="pictofixedwidth"').$labeltoshow; } else { - $labeltoshow .= ' ('.$langs->trans("Visibility").': '.$langs->trans("SharedProject").')'; + //$labeltoshow .= ' ('.$langs->trans("Visibility").': '.$langs->trans("SharedProject").')'; + $labeltoshow = img_picto($lines[$i]->projectlabel, 'projectpub', 'class="pictofixedwidth"').$labeltoshow; } print ' data-html="'.dol_escape_htmltag($labeltoshow).'"'; @@ -738,12 +741,14 @@ class FormOther print ' disabled'; } - $labeltoshow = $langs->trans("Project").' '.$lines[$i]->projectref; - $labeltoshow .= ' '.$lines[$i]->projectlabel; + $labeltoshow = $lines[$i]->projectref; + //$labeltoshow .= ' '.$lines[$i]->projectlabel; if (empty($lines[$i]->public)) { - $labeltoshow .= ' ('.$langs->trans("Visibility").': '.$langs->trans("PrivateProject").')'; + //$labeltoshow .= ' ('.$langs->trans("Visibility").': '.$langs->trans("PrivateProject").')'; + $labeltoshow = img_picto($lines[$i]->projectlabel, 'project', 'class="pictofixedwidth"').$labeltoshow; } else { - $labeltoshow .= ' ('.$langs->trans("Visibility").': '.$langs->trans("SharedProject").')'; + //$labeltoshow .= ' ('.$langs->trans("Visibility").': '.$langs->trans("SharedProject").')'; + $labeltoshow = img_picto($lines[$i]->projectlabel, 'projectpub', 'class="pictofixedwidth"').$labeltoshow; } if ($lines[$i]->id) { $labeltoshow .= ' > '; diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index d53870128fc..c820e260b4e 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -650,7 +650,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t if ($showproject) { // Project ref - print ""; + print ''; //if ($showlineingray) print ''; if ($lines[$i]->public || in_array($lines[$i]->fk_project, $projectsArrayId) || !empty($user->rights->projet->all->lire)) { print $projectstatic->getNomUrl(1); @@ -701,21 +701,21 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t } if (count($arrayfields) > 0 && !empty($arrayfields['t.description']['checked'])) { - print ""; + print ''; print $lines[$i]->description; print "\n"; } // Date start if (count($arrayfields) > 0 && !empty($arrayfields['t.dateo']['checked'])) { - print ''; + print ''; print dol_print_date($lines[$i]->date_start, 'dayhour'); print ''; } // Date end if (count($arrayfields) > 0 && !empty($arrayfields['t.datee']['checked'])) { - print ''; + print ''; print dol_print_date($lines[$i]->date_end, 'dayhour'); if ($taskstatic->hasDelay()) { print img_warning($langs->trans("Late")); diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index f2e514afe56..612aa0e6fe7 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -729,16 +729,21 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third // Project print ''.$langs->trans("ChildOfProjectTask").''; print img_picto('', 'project'); - $formother->selectProjectTasks(GETPOST('task_parent'), !empty($projectid) ? $projectid : $object->id, 'task_parent', 0, 0, 1, 1, 0, '0,1', 'maxwidth500'); + $formother->selectProjectTasks(GETPOST('task_parent'), empty($projectid) ? $object->id : $projectid, 'task_parent', 0, 0, 1, 1, 0, '0,1', 'maxwidth500 widthcentpercentminusxx'); print ''; + $contactsofproject = (empty($object->id) ? '' : $object->getListContactId('internal')); + // Assigned to print ''.$langs->trans("AffectedTo").''; - $contactsofproject = (!empty($object->id) ? $object->getListContactId('internal') : ''); if (is_array($contactsofproject) && count($contactsofproject)) { print $form->select_dolusers($user->id, 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, '', 'maxwidth300'); } else { - print ''.$langs->trans("NoUserAssignedToTheProject").''; + if ($projectid > 0 || $object->id > 0) { + print ''.$langs->trans("NoUserAssignedToTheProject").''; + } else { + print $form->select_dolusers($user->id, 'userid', 0, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); + } } print '';