Work on gantt view.
This commit is contained in:
parent
ba908ed743
commit
8044300ef7
@ -78,6 +78,7 @@ DoNotShowMyTasksOnly=See also tasks i am not affected to
|
||||
ShowMyTasksOnly=View only tasks i am affected to
|
||||
TaskRessourceLinks=Ressources
|
||||
ProjectsDedicatedToThisThirdParty=Projects dedicated to this third party
|
||||
NoTasks=No tasks for this project
|
||||
##### Types de contacts #####
|
||||
TypeContact_project_internal_PROJECTLEADER=Project leader
|
||||
TypeContact_project_external_PROJECTLEADER=Project leader
|
||||
|
||||
@ -78,6 +78,7 @@ DoNotShowMyTasksOnly=Voir aussi les taches qui ne me sont pas affectées
|
||||
ShowMyTasksOnly=Ne voir que les taches qui me sont affectées
|
||||
TaskRessourceLinks=Affectation ressources
|
||||
ProjectsDedicatedToThisThirdParty=Projets dédiés à ce tiers
|
||||
NoTasks=Aucune tache pour ce projet
|
||||
##### Types de contacts #####
|
||||
TypeContact_project_internal_PROJECTLEADER=Chef de projet
|
||||
TypeContact_project_external_PROJECTLEADER=Chef de projet
|
||||
|
||||
@ -157,7 +157,8 @@ if ($_GET["action"] == 'deleteline' && $user->rights->projet->creer)
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader('', $langs->trans("Project"), "Project");
|
||||
$help_url="EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
|
||||
llxHeader('', $langs->trans("Project"), $help_url);
|
||||
|
||||
$html = new Form($db);
|
||||
$formcompany= new FormCompany($db);
|
||||
|
||||
@ -73,7 +73,8 @@ $result = restrictedArea($user, 'projet', $projectid);
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader("",$langs->trans("Referers"),"EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos");
|
||||
$help_url="EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
|
||||
llxHeader("",$langs->trans("Referers"),$help_url);
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
|
||||
@ -179,37 +179,44 @@ $tasksrole=($_REQUEST["mode"]=='mine' ? $task->getUserRolesForProjectsOrTasks(0,
|
||||
//var_dump($tasksrole);
|
||||
|
||||
|
||||
// Show Gant diagram from $taskarray using JSGantt
|
||||
|
||||
$dateformat=$langs->trans("FormatDateShort");
|
||||
$dateformat=strtolower($langs->trans("FormatDateShortJava"));
|
||||
$array_contacts=array();
|
||||
$tasks=array();
|
||||
$project_dependencies=array();
|
||||
$project_id=$project->id;
|
||||
$i=0;
|
||||
foreach($tasksarray as $key => $val)
|
||||
if (sizeof($tasksarray)>0)
|
||||
{
|
||||
// if ($val->date_start && $val->date_end)
|
||||
// {
|
||||
$tasks[$i]['task_id']=$val->id;
|
||||
$tasks[$i]['task_parent']=$val->fk_parent;
|
||||
$tasks[$i]['task_is_group']=0;
|
||||
$tasks[$i]['task_milestone']=0;
|
||||
$tasks[$i]['task_percent_complete']=$val->progress;
|
||||
$tasks[$i]['task_name']=$val->label;
|
||||
$tasks[$i]['task_start_date']=$val->date_start;
|
||||
$tasks[$i]['task_end_date']=$val->date_end;
|
||||
$i++;
|
||||
// }
|
||||
|
||||
// Show Gant diagram from $taskarray using JSGantt
|
||||
|
||||
$dateformat=$langs->trans("FormatDateShort");
|
||||
$dateformat=strtolower($langs->trans("FormatDateShortJava"));
|
||||
$array_contacts=array();
|
||||
$tasks=array();
|
||||
$project_dependencies=array();
|
||||
$project_id=$project->id;
|
||||
$i=0;
|
||||
foreach($tasksarray as $key => $val)
|
||||
{
|
||||
// if ($val->date_start && $val->date_end)
|
||||
// {
|
||||
$tasks[$i]['task_id']=$val->id;
|
||||
$tasks[$i]['task_parent']=$val->fk_parent;
|
||||
$tasks[$i]['task_is_group']=0;
|
||||
$tasks[$i]['task_milestone']=0;
|
||||
$tasks[$i]['task_percent_complete']=$val->progress;
|
||||
$tasks[$i]['task_name']=$val->label;
|
||||
$tasks[$i]['task_start_date']=$val->date_start;
|
||||
$tasks[$i]['task_end_date']=$val->date_end;
|
||||
$i++;
|
||||
// }
|
||||
}
|
||||
//var_dump($tasks);
|
||||
|
||||
print "\n";
|
||||
print '<div id="tabs" style="border: 1px solid #ACACAC;">'."\n";
|
||||
include_once(DOL_DOCUMENT_ROOT.'/projet/ganttchart.php');
|
||||
print '</div>'."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("NoTasks");
|
||||
}
|
||||
//var_dump($tasks);
|
||||
|
||||
print "\n";
|
||||
print '<div id="tabs">'."\n";
|
||||
include_once(DOL_DOCUMENT_ROOT.'/projet/ganttchart.php');
|
||||
print '</div>'."\n";
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
|
||||
@ -309,9 +309,16 @@ else
|
||||
print '<td align="right">'.$langs->trans("Progress").'</td>';
|
||||
print '<td align="right">'.$langs->trans("TimeSpent").'</td>';
|
||||
print "</tr>\n";
|
||||
// Show all lines in taskarray (recursive function to go down on tree)
|
||||
$j=0;
|
||||
$nboftaskshown=PLines($j, 0, $tasksarray, $level, true, 0, $tasksrole);
|
||||
if (sizeof($tasksarray) > 0)
|
||||
{
|
||||
// Show all lines in taskarray (recursive function to go down on tree)
|
||||
$j=0;
|
||||
$nboftaskshown=PLines($j, 0, $tasksarray, $level, true, 0, $tasksrole);
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td colspan="'.($projectstatic->id?"5":"4").'">'.$langs->trans("NoTasks").'</td></tr>';
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user