diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index f0417e3ae4a..8512b306499 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -60,6 +60,9 @@ if ($_GET["id"] > 0)
{
$result=$projectstatic->fetch($task->fk_project);
if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid);
+
+ // To verify role of users
+ $userAccess = $projectstatic->restrictedProjectArea($user);
$head=task_prepare_head($task);
@@ -67,9 +70,6 @@ if ($_GET["id"] > 0)
if ($mesg) print $mesg.'
';
- print '
| '.$langs->trans("By").' | '; print ''.$langs->trans("Date").' | '; print ''.$langs->trans("TimeSpent").' | '; - print ''.$langs->trans("By").' | '; + print ''; print " | |
| '.$user->getNomUrl(1).' | '; // Date print ''.dol_print_date($db->jdate($task_time->task_date),'%A').' '.dol_print_date($db->jdate($task_time->task_date),'daytext').' | '; @@ -164,13 +174,19 @@ if ($_GET["id"] > 0) $minutes = round((($task_time->task_duration - $heure) * 60),0); $minutes = substr("00"."$minutes", -2); print ''.$heure." h ".$minutes." | \n"; - - // User - $user->id = $task_time->rowid; - $user->nom = $task_time->name; - $user->prenom = $task_time->firstname; - print ''.$user->getNomUrl(1).' | '; - print "'; + if ($user->rights->projet->creer && $userAccess) + { + print ' '; + print 'id.'&action=deleteline&lineid='.$task_time->rowid.'">'; + print img_delete(); + print ''; + } + print ' | '; + + print "\n"; } print "|