From 1275a41244c4e4b00004fe957ac9985c18ec01bf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 7 Sep 2012 00:14:50 +0200 Subject: [PATCH] New: Start to work on position of tasks into a project --- htdocs/core/lib/project.lib.php | 9 ++++++++- htdocs/projet/tasks.php | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index d7a4f21ee00..3f8e5831d9d 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -266,9 +266,10 @@ function select_projects($socid=-1, $selected='', $htmlname='projectid', $maxlen * @param int $showproject Show project columns * @param int &$taskrole Array of roles of user for each tasks * @param int $projectsListId List of id of project allowed to user (separated with comma) + * @param int $addordertick Add a tick to move task * @return void */ -function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$taskrole, $projectsListId='') +function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$taskrole, $projectsListId='', $addordertick=0) { global $user, $bc, $langs; global $projectstatic, $taskstatic; @@ -394,6 +395,12 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t else print ''; print ''; + // Tick to drag and drop + if ($addordertick) + { + print ' '; + } + print "\n"; if (! $showlineingray) $inc++; diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index ac80a52a46c..30c29258435 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -363,12 +363,13 @@ else print ''.$langs->trans("DateEnd").''; print ''.$langs->trans("Progress").''; print ''.$langs->trans("TimeSpent").''; + print ' '; print "\n"; if (count($tasksarray) > 0) { // Show all lines in taskarray (recursive function to go down on tree) $j=0; - $nboftaskshown=projectLinesa($j, 0, $tasksarray, $level, true, 0, $tasksrole); + $nboftaskshown=projectLinesa($j, 0, $tasksarray, $level, true, 0, $tasksrole, '', 1); } else {