A lot of fix in project module
This commit is contained in:
parent
a3bb3f2cee
commit
a5dcf433f6
@ -250,20 +250,19 @@ function PLinesb(&$inc, $parent, $lines, &$level, &$tasksrole)
|
|||||||
$minutes = substr("00"."$minutes", -2);
|
$minutes = substr("00"."$minutes", -2);
|
||||||
print '<td align="right">'.$heure." h ".$minutes."</td>\n";
|
print '<td align="right">'.$heure." h ".$minutes."</td>\n";
|
||||||
|
|
||||||
if ($tasksrole[$lines[$i]->id] == 'TASKEXECUTIVE')
|
$disabled=1;
|
||||||
{
|
// If at least one role for project
|
||||||
|
if (! empty($tasksrole[$lines[$i]->id])
|
||||||
|
&& sizeof($tasksrole[$lines[$i]->id]) > 0) $disabled=0;
|
||||||
|
|
||||||
print '<td nowrap="nowrap">';
|
print '<td nowrap="nowrap">';
|
||||||
print $form->select_date('',$lines[$i]->id,'','','',"addtime");
|
print $form->select_date('',$lines[$i]->id,'','','',"addtime");
|
||||||
print ' <input size="4" type="text" class="flat" name="task'.$lines[$i]->id.'" value="">';
|
print ' <input size="4" type="text" class="flat"'.($disabled?' disabled="true"':'').' name="task'.$lines[$i]->id.'" value="">';
|
||||||
print ' <input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
print ' <input type="submit" class="button"'.($disabled?' disabled="true"':'').' value="'.$langs->trans("Add").'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "<td> ";
|
print "<td> ";
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<td colspan="2"> </td>';
|
|
||||||
}
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$inc++;
|
$inc++;
|
||||||
$level++;
|
$level++;
|
||||||
|
|||||||
@ -244,9 +244,9 @@ else
|
|||||||
*/
|
*/
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
if ($user->rights->projet->creer)
|
if ($user->rights->projet->all->creer || $user->rights->projet->creer)
|
||||||
{
|
{
|
||||||
if ($userAccess)
|
if ($project->public || $userAccess)
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$project->id.'&action=create'.$param.'">'.$langs->trans('AddTask').'</a>';
|
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$project->id.'&action=create'.$param.'">'.$langs->trans('AddTask').'</a>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -495,6 +495,7 @@ class Task extends CommonObject
|
|||||||
$tasks[$i]->description = $obj->description;
|
$tasks[$i]->description = $obj->description;
|
||||||
$tasks[$i]->fk_parent = $obj->fk_task_parent;
|
$tasks[$i]->fk_parent = $obj->fk_task_parent;
|
||||||
$tasks[$i]->duration = $obj->duration_effective;
|
$tasks[$i]->duration = $obj->duration_effective;
|
||||||
|
$tasks[$i]->public = $obj->public;
|
||||||
}
|
}
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
@ -561,7 +562,8 @@ class Task extends CommonObject
|
|||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$row = $this->db->fetch_row($resql);
|
$row = $this->db->fetch_row($resql);
|
||||||
$tasksrole[$row[0]] = $row[1];
|
if (empty($tasksrole[$row[0]])) $tasksrole[$row[0]] = $row[1];
|
||||||
|
else $tasksrole[$row[0]].=','.$row[1];
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user