New: Start to work on position of tasks into a project

This commit is contained in:
Laurent Destailleur 2012-09-07 00:14:50 +02:00
parent 28e7b73d21
commit 1275a41244
2 changed files with 10 additions and 2 deletions

View File

@ -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 '</a>';
print '</td>';
// Tick to drag and drop
if ($addordertick)
{
print '<td align="center" class="tdlineupdown">&nbsp;</td>';
}
print "</tr>\n";
if (! $showlineingray) $inc++;

View File

@ -363,12 +363,13 @@ else
print '<td align="center">'.$langs->trans("DateEnd").'</td>';
print '<td align="right">'.$langs->trans("Progress").'</td>';
print '<td align="right">'.$langs->trans("TimeSpent").'</td>';
print '<td>&nbsp;</td>';
print "</tr>\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
{