Work on gantt view.

This commit is contained in:
Laurent Destailleur 2010-05-23 20:37:28 +00:00
parent ba908ed743
commit 8044300ef7
6 changed files with 52 additions and 34 deletions

View File

@ -78,6 +78,7 @@ DoNotShowMyTasksOnly=See also tasks i am not affected to
ShowMyTasksOnly=View only tasks i am affected to ShowMyTasksOnly=View only tasks i am affected to
TaskRessourceLinks=Ressources TaskRessourceLinks=Ressources
ProjectsDedicatedToThisThirdParty=Projects dedicated to this third party ProjectsDedicatedToThisThirdParty=Projects dedicated to this third party
NoTasks=No tasks for this project
##### Types de contacts ##### ##### Types de contacts #####
TypeContact_project_internal_PROJECTLEADER=Project leader TypeContact_project_internal_PROJECTLEADER=Project leader
TypeContact_project_external_PROJECTLEADER=Project leader TypeContact_project_external_PROJECTLEADER=Project leader

View File

@ -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 ShowMyTasksOnly=Ne voir que les taches qui me sont affectées
TaskRessourceLinks=Affectation ressources TaskRessourceLinks=Affectation ressources
ProjectsDedicatedToThisThirdParty=Projets dédiés à ce tiers ProjectsDedicatedToThisThirdParty=Projets dédiés à ce tiers
NoTasks=Aucune tache pour ce projet
##### Types de contacts ##### ##### Types de contacts #####
TypeContact_project_internal_PROJECTLEADER=Chef de projet TypeContact_project_internal_PROJECTLEADER=Chef de projet
TypeContact_project_external_PROJECTLEADER=Chef de projet TypeContact_project_external_PROJECTLEADER=Chef de projet

View File

@ -157,7 +157,8 @@ if ($_GET["action"] == 'deleteline' && $user->rights->projet->creer)
* View * 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); $html = new Form($db);
$formcompany= new FormCompany($db); $formcompany= new FormCompany($db);

View File

@ -73,7 +73,8 @@ $result = restrictedArea($user, 'projet', $projectid);
* View * 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); $form = new Form($db);

View File

@ -179,37 +179,44 @@ $tasksrole=($_REQUEST["mode"]=='mine' ? $task->getUserRolesForProjectsOrTasks(0,
//var_dump($tasksrole); //var_dump($tasksrole);
// Show Gant diagram from $taskarray using JSGantt if (sizeof($tasksarray)>0)
$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)
// { // Show Gant diagram from $taskarray using JSGantt
$tasks[$i]['task_id']=$val->id;
$tasks[$i]['task_parent']=$val->fk_parent; $dateformat=$langs->trans("FormatDateShort");
$tasks[$i]['task_is_group']=0; $dateformat=strtolower($langs->trans("FormatDateShortJava"));
$tasks[$i]['task_milestone']=0; $array_contacts=array();
$tasks[$i]['task_percent_complete']=$val->progress; $tasks=array();
$tasks[$i]['task_name']=$val->label; $project_dependencies=array();
$tasks[$i]['task_start_date']=$val->date_start; $project_id=$project->id;
$tasks[$i]['task_end_date']=$val->date_end; $i=0;
$i++; 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(); $db->close();

View File

@ -309,9 +309,16 @@ else
print '<td align="right">'.$langs->trans("Progress").'</td>'; print '<td align="right">'.$langs->trans("Progress").'</td>';
print '<td align="right">'.$langs->trans("TimeSpent").'</td>'; print '<td align="right">'.$langs->trans("TimeSpent").'</td>';
print "</tr>\n"; print "</tr>\n";
// Show all lines in taskarray (recursive function to go down on tree) if (sizeof($tasksarray) > 0)
$j=0; {
$nboftaskshown=PLines($j, 0, $tasksarray, $level, true, 0, $tasksrole); // 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>"; print "</table>";