diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index 57406704bf4..cec985584a0 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -213,3 +213,5 @@ AllowCommentOnTask=Allow user comments on tasks TaskCommentLinks=Comments TaskNbComments=Number of comments TaskComment=Task's comments space +CommentAdded=Comment added +CommentDeleted=Comment deleted diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang index ece3272c743..154c1138ab9 100644 --- a/htdocs/langs/fr_FR/projects.lang +++ b/htdocs/langs/fr_FR/projects.lang @@ -212,3 +212,5 @@ AllowCommentOnTask=Autoriser les commentaires entre utilisateurs sur les tâches TaskCommentLinks=Commentaires TaskNbComments=Nombre de commentaires TaskComment=Tâches espace commentaires +CommentAdded=Commentaire ajouté avec succès +CommentDeleted=Commentaire supprimé avec succès diff --git a/htdocs/projet/tasks/comment.php b/htdocs/projet/tasks/comment.php index 69f5125d899..3ee3cf2593b 100644 --- a/htdocs/projet/tasks/comment.php +++ b/htdocs/projet/tasks/comment.php @@ -81,6 +81,7 @@ if ($action == 'addcomment') $object->entity = $conf->entity; if ($object->create($user) > 0) { + setEventMessages($langs->trans("CommentAdded"), null, 'mesgs'); header('Location: '.DOL_URL_ROOT.'/projet/tasks/comment.php?id='.$id.($withproject?'&withproject=1':'')); exit; } @@ -97,6 +98,7 @@ if ($action == 'deletecomment') { if ($object->delete($user) > 0) { + setEventMessages($langs->trans("CommentDeleted"), null, 'mesgs'); header('Location: '.DOL_URL_ROOT.'/projet/tasks/comment.php?id='.$id.($withproject?'&withproject=1':'')); exit; } @@ -366,24 +368,35 @@ if ($id > 0 || ! empty($ref)) print '
'; + } print $langs->trans('User').' : '.$userstatic->getNomUrl().'
'; print $langs->trans('Date').' : '.dol_print_date($comment->datec,'dayhoursec'); + print '
'.$langs->trans('Delete').''; + print ''; + print img_picto('', 'delete.png'); + print ''; } - print '