From 892cfaa456ad7825824534f329076b55c58f4a32 Mon Sep 17 00:00:00 2001 From: Nicolas Domenech Date: Mon, 10 Jul 2023 20:16:22 +0200 Subject: [PATCH] #374 [TimeSpent] add: project status info --- lib/dolisirh_timespent.lib.php | 4 ++-- view/timespent_month.php | 2 +- view/timespent_week.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/dolisirh_timespent.lib.php b/lib/dolisirh_timespent.lib.php index db24d73..16977fd 100644 --- a/lib/dolisirh_timespent.lib.php +++ b/lib/dolisirh_timespent.lib.php @@ -428,7 +428,6 @@ function doliSirhGetTasksArray($usert = null, $userp = null, $projectid = 0, $so } } - $sql .= " ORDER BY p.ref, t.rang, t.dateo"; //print $sql;exit; @@ -948,7 +947,7 @@ function doliSirhTaskLinesWithinRange(&$inc, $firstdaytoshow, $lastdaytoshow, $f } print '' . "\n"; - print ''; + print 'status == $projectstatic::STATUS_CLOSED ? 'style="background-color: #CBCDCD!important;"' : '') . '>'; print $projectstatic->getNomUrl(1, '', 0, '' . $langs->transnoentitiesnoconv("YourRole") . ': ' . $projectsrole[$lines[$i]->fk_project]); if ($thirdpartystatic->id > 0) { print ' - ' . $thirdpartystatic->getNomUrl(1); @@ -957,6 +956,7 @@ function doliSirhTaskLinesWithinRange(&$inc, $firstdaytoshow, $lastdaytoshow, $f print ' - '; print '' . dol_trunc($projectstatic->title, '64') . ''; } + print ' - ' . $projectstatic->getLibStatut(5); print ''; print ''; diff --git a/view/timespent_month.php b/view/timespent_month.php index c53e73c..57cc0a9 100644 --- a/view/timespent_month.php +++ b/view/timespent_month.php @@ -314,7 +314,7 @@ $project->fetch_thirdparty(); } - $onlyopenedproject = 1; // or -1 + $onlyopenedproject = -1; // or -1 $morewherefilter = ''; if ($search_project_ref) { diff --git a/view/timespent_week.php b/view/timespent_week.php index 8f73a7a..0be9491 100644 --- a/view/timespent_week.php +++ b/view/timespent_week.php @@ -320,7 +320,7 @@ $project->fetch_thirdparty(); } -$onlyopenedproject = 1; // or -1 +$onlyopenedproject = -1; // or -1 $morewherefilter = ''; if ($search_project_ref) {