'; print '
'; print '
'; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print "\n"; print ''; // Description print ''; print ''; print '
'.$langs->trans("Comments").'
'; $desc = GETPOST('comment_description'); $doleditor = new DolEditor('comment_description', $desc, '', 80, 'dolibarr_notes', 'In', 0, true, true, ROWS_3, '100%'); print $doleditor->Create(1); print ''; print ''; print '
'; // List of comments if (!empty($object->comments)) { // Default color for current user $TColors = array($user->id => array('bgcolor'=>'efefef','color'=>'555')); $first = true; foreach($object->comments as $comment) { $fk_user = $comment->fk_user_author; $userstatic->fetch($fk_user); if(empty($TColors[$fk_user])) { $bgcolor = random_color(180,240); if(!empty($userstatic->color)) { $bgcolor = $userstatic->color; } $color = (colorIsLight($bgcolor))?'555':'fff'; $TColors[$fk_user] = array('bgcolor'=>$bgcolor,'color'=>$color); } print '
'; if ($fk_user != $user->id) { print '
 
'; } print '
'; print '
'; if (! empty($user->photo)) { print Form::showphoto('userphoto', $userstatic, 80, 0, 0, '', 'small', 0, 1).'
'; } print $langs->trans('User').' : '.$userstatic->getNomUrl().'
'; print $langs->trans('Date').' : '.dol_print_date($comment->datec,'dayhoursec'); print '
'; // End comment-info print '
'; print '
'; print '
'; print $comment->description; print '
'; // End comment-description if(($first && $fk_user == $user->id) || $user->admin == 1) { print ''; print img_picto('', 'delete.png'); print ''; } print '
'; // End comment-table print '
'; // End comment-right print '
'; // End comment if($fk_user == $user->id) { print '
 
'; } print '
'; print '
'; // end 100p $first = false; } } print '
'; print '
';