diff --git a/htdocs/projet/activity/list.php b/htdocs/projet/activity/list.php index f5b5b2aa456..09cc56c54e8 100644 --- a/htdocs/projet/activity/list.php +++ b/htdocs/projet/activity/list.php @@ -70,7 +70,7 @@ if ($action == 'addtime' && $user->rights->projet->creer) { // We store HOURS in seconds if($matches[2]=='hour') $timespent_duration[$id] += $time*60*60; - + // We store MINUTES in seconds if($matches[2]=='min') $timespent_duration[$id] += $time*60; } @@ -88,9 +88,9 @@ if ($action == 'addtime' && $user->rights->projet->creer) $task->timespent_date = dol_mktime(12,0,0,$_POST["{$key}month"],$_POST["{$key}day"],$_POST["{$key}year"]); $task->addTimeSpent($user); } - + setEventMessage($langs->trans("RecordSaved")); - + // Redirect to avoid submit twice on back header('Location: '.$_SERVER["PHP_SELF"].'?id='.$projectid.($mode?'&mode='.$mode:'')); exit; @@ -101,6 +101,8 @@ if ($action == 'addtime' && $user->rights->projet->creer) } } + + /* * View */ @@ -113,7 +115,6 @@ $taskstatic = new Task($db); $title=$langs->trans("TimeSpent"); if ($mine) $title=$langs->trans("MyTimeSpent"); - //$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,1); $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,1); // Return all project i have permission on. I want my tasks and some of my task may be on a public projet that is not my project @@ -128,16 +129,19 @@ $projectsrole=$taskstatic->getUserRolesForProjectsOrTasks($user,0,($project->id? $tasksrole=$taskstatic->getUserRolesForProjectsOrTasks(0,$user,($project->id?$project->id:$projectsListId),0); -llxHeader("",$title,""); - - -llxHeader("",$title,""); - - llxHeader("",$title,""); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num); +// Show description of content +if ($mine) print $langs->trans("MyTasksDesc").'

'; +else +{ + if ($user->rights->projet->all->lire && ! $socid) print $langs->trans("ProjectsDesc").'

'; + else print $langs->trans("ProjectsPublicTakDesc").'

'; +} + + // Filter on user /* dol_fiche_head(''); print ''; @@ -177,7 +181,7 @@ print ''; print "\n"; // By default, we can edit only tasks we are assigned to -$restricteditformytask=(empty($conf->global->PROJECT_TIME_ON_ALL_TASKS_MY_PROJECTS)?1:0); +$restricteditformytask=(empty($conf->global->PROJECT_TIME_ON_ALL_TASKS_MY_PROJECTS)?1:0); if (count($tasksarray) > 0) { diff --git a/htdocs/projet/tasks/index.php b/htdocs/projet/tasks/index.php index d019a629bdd..12d7dca69eb 100644 --- a/htdocs/projet/tasks/index.php +++ b/htdocs/projet/tasks/index.php @@ -75,7 +75,7 @@ if ($id) print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num); // Show description of content -if ($mine) print $langs->trans("MyProjectsDesc").'

'; +if ($mine) print $langs->trans("MyTasksDesc").'

'; else { if ($user->rights->projet->all->lire && ! $socid) print $langs->trans("ProjectsDesc").'

';
'.$langs->trans("User").''.$langs->trans("AddDuration").'