Cherry pick

This commit is contained in:
Laurent Destailleur 2017-09-17 20:05:36 +02:00
parent 39acb46139
commit bb73da4c5e
5 changed files with 41 additions and 15 deletions

View File

@ -187,7 +187,7 @@ if ($id > 0 || ! empty($ref))
// Tabs for project
$tab='tasks';
$head=project_prepare_head($projectstatic);
dol_fiche_head($head, $tab, $langs->trans("Project"),0,($projectstatic->public?'projectpub':'project'));
dol_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public?'projectpub':'project'));
$param=($mode=='mine'?'&mode=mine':'');
@ -272,8 +272,11 @@ if ($id > 0 || ! empty($ref))
print '<div class="clearboth"></div>';
dol_fiche_end();
print '<br>';
}
// To verify role of users
//$userAccess = $projectstatic->restrictedProjectArea($user); // We allow task affected to user even if a not allowed project
//$arrayofuseridoftask=$object->getListContactId('internal');

View File

@ -130,7 +130,8 @@ if ($object->id > 0)
// Tabs for project
$tab='tasks';
$head=project_prepare_head($projectstatic);
dol_fiche_head($head, $tab, $langs->trans("Project"),0,($projectstatic->public?'projectpub':'project'));
dol_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public?'projectpub':'project'));
$param=($mode=='mine'?'&mode=mine':'');
@ -215,6 +216,8 @@ if ($object->id > 0)
print '<div class="clearboth"></div>';
dol_fiche_end();
print '<br>';
}
$head = task_prepare_head($object);

View File

@ -110,7 +110,7 @@ if ($object->id > 0)
// Tabs for project
$tab='tasks';
$head=project_prepare_head($projectstatic);
dol_fiche_head($head, $tab, $langs->trans("Project"), 0, ($projectstatic->public?'projectpub':'project'));
dol_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public?'projectpub':'project'));
$param=($mode=='mine'?'&mode=mine':'');
// Project card
@ -194,6 +194,8 @@ if ($object->id > 0)
print '<div class="clearboth"></div>';
dol_fiche_end();
print '<br>';
}
$head = task_prepare_head($object);

View File

@ -279,6 +279,7 @@ if ($id > 0 || ! empty($ref))
print '</table>';
print '</div>';
print '<div class="fichehalfright">';
print '<div class="ficheaddleft">';
print '<div class="underbanner clearboth"></div>';
@ -468,6 +469,7 @@ if ($id > 0 || ! empty($ref))
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param);
print '<div class="fichecenter">';
print '<div class="fichehalfleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">';
@ -490,8 +492,21 @@ if ($id > 0 || ! empty($ref))
}
print '</td></tr>';
// Description
print '<td class="tdtop">'.$langs->trans("Description").'</td><td colspan="3">';
print nl2br($object->description);
print '</td></tr>';
print '</table>';
print '</div>';
print '<div class="fichehalfright"><div class="ficheaddleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">';
// Progress declared
print '<tr><td>'.$langs->trans("ProgressDeclared").'</td><td colspan="3">';
print '<tr><td class="titlefield">'.$langs->trans("ProgressDeclared").'</td><td colspan="3">';
if ($object->progress != '')
{
print $object->progress.' %';
@ -506,12 +521,7 @@ if ($id > 0 || ! empty($ref))
if ($tmparray['total_duration'] > 0 && ! empty($object->planned_workload)) print round($tmparray['total_duration'] / $object->planned_workload * 100, 2).' %';
else print '0 %';
}
else print '';
print '</td></tr>';
// Description
print '<td class="tdtop">'.$langs->trans("Description").'</td><td colspan="3">';
print nl2br($object->description);
else print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>';
print '</td></tr>';
// Other attributes
@ -522,6 +532,10 @@ if ($id > 0 || ! empty($ref))
print '</table>';
print '</div>';
print '</div>';
print '</div>';
print '<div class="clearboth"></div>';
dol_fiche_end();
}

View File

@ -418,6 +418,10 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
print '</div>';
}
else
{
print '<br>';
}
}
}
@ -442,7 +446,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
else $object->next_prev_filter=" fk_projet = ".$projectstatic->id;
$morehtmlref='';
// Project
if (empty($withproject))
{
@ -450,7 +454,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
$morehtmlref.=$langs->trans("Project").': ';
$morehtmlref.=$projectstatic->getNomUrl(1);
$morehtmlref.='<br>';
// Third party
$morehtmlref.=$langs->trans("ThirdParty").': ';
if (is_object($projectstatic->thirdparty)) {
@ -464,7 +468,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
print '<div class="fichecenter">';
print '<div class="fichehalfleft">';
print '<div class="underbanner clearboth"></div>';
print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">';
// Date start - Date end
@ -491,7 +495,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
print '<table class="border" width="100%">';
// Progress declared
print '<tr><td>'.$langs->trans("ProgressDeclared").'</td><td>';
print '<tr><td class="titlefield">'.$langs->trans("ProgressDeclared").'</td><td>';
print $object->progress.' %';
print '</td></tr>';
@ -503,7 +507,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
if ($tmparray['total_duration'] > 0) print round($tmparray['total_duration']/$object->planned_workload*100, 2).' %';
else print '0 %';
}
else print '';
else print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>';
print '</td></tr>';
print '</table>';