forked from Wavyzz/dolibarr
Doxygen
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -24,7 +24,8 @@
|
||||
?>
|
||||
|
||||
<div id="principal_content" style="margin-left: 0px;">
|
||||
<div style="margin-left: 0; position: relative;" class="gantt" id="GanttChartDIV"></div>
|
||||
<div style="margin-left: 0; position: relative;" class="gantt"
|
||||
id="GanttChartDIV"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -113,12 +114,24 @@ else
|
||||
{
|
||||
alert("<?php echo $langs->trans("FailedToDefinGraph"); ?>");
|
||||
}
|
||||
</script></div>
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
function constructGanttLine($tarr,$task,$project_dependencies,$level=0,$project_id=null){
|
||||
/**
|
||||
* Add a gant chart line
|
||||
*
|
||||
* @param string $tarr tarr
|
||||
* @param Task $task Task object
|
||||
* @param Project $project_dependencies Project object
|
||||
* @param int $level Level
|
||||
* @param int $project_id Id of project
|
||||
* @return void
|
||||
*/
|
||||
function constructGanttLine($tarr,$task,$project_dependencies,$level=0,$project_id=null)
|
||||
{
|
||||
$start_date = $task["task_start_date"];
|
||||
$end_date = $task["task_end_date"];
|
||||
if (!$end_date) $end_date = $start_date;
|
||||
@@ -129,7 +142,8 @@ function constructGanttLine($tarr,$task,$project_dependencies,$level=0,$project_
|
||||
// Define depend (ex: "", "4,13", ...)
|
||||
$depend = "\"";
|
||||
$count = 0;
|
||||
foreach ($project_dependencies as $value) { // Not yet used project_dependencies = array(array(0=>idtask,1=>idtasktofinishfisrt))
|
||||
foreach ($project_dependencies as $value) {
|
||||
// Not yet used project_dependencies = array(array(0=>idtask,1=>idtasktofinishfisrt))
|
||||
if ($value[0] == $task['task_id']) {
|
||||
$depend.=($count>0?",":"").$value[1];
|
||||
$count ++;
|
||||
@@ -147,7 +161,9 @@ function constructGanttLine($tarr,$task,$project_dependencies,$level=0,$project_
|
||||
$link=DOL_URL_ROOT.'/projet/tasks/task.php?withproject=1&id='.$task["task_id"];
|
||||
// Name
|
||||
$name=$task['task_name'];
|
||||
for($i=0; $i < $level; $i++) { $name=' '.$name; }
|
||||
for($i=0; $i < $level; $i++) {
|
||||
$name=' '.$name;
|
||||
}
|
||||
// Add line to gantt
|
||||
$s = "// Add taks id=".$task["task_id"]." level = ".$level."\n";
|
||||
//$s.= "g.AddElementItem(new JSGantt.ElementItem('task',".$task['task_id'].",'".$name."','".$start_date."', '".$end_date."', '".$task['task_color']."', '', ".$task['task_milestone'].", '".$resources."', ".$percent.", ".($task["task_is_group"]>0?1:0).", ".$parent.", 1".($depend?", ".$depend:"")."));";
|
||||
@@ -155,9 +171,20 @@ function constructGanttLine($tarr,$task,$project_dependencies,$level=0,$project_
|
||||
echo $s."\n";
|
||||
}
|
||||
|
||||
function findChildGanttLine($tarr,$parent,$project_dependencies,$level) {
|
||||
/**
|
||||
* Find child Gantt line
|
||||
*
|
||||
* @param string $tarr tarr
|
||||
* @param int $parent Parent
|
||||
* @param Project $project_dependencies Project object
|
||||
* @param int $level Level
|
||||
* @return void
|
||||
*/
|
||||
function findChildGanttLine($tarr,$parent,$project_dependencies,$level)
|
||||
{
|
||||
$n=count($tarr);
|
||||
for ($x=0; $x < $n; $x++) {
|
||||
for ($x=0; $x < $n; $x++)
|
||||
{
|
||||
if($tarr[$x]["task_parent"] == $parent && $tarr[$x]["task_parent"] != $tarr[$x]["task_id"])
|
||||
{
|
||||
constructGanttLine($tarr,$tarr[$x],$project_dependencies,$level,null);
|
||||
|
||||
@@ -417,7 +417,7 @@ class UserGroup extends CommonObject
|
||||
/**
|
||||
* Charge dans l'objet group, la liste des permissions auquels le groupe a droit
|
||||
*
|
||||
* @param string $module Nom du module dont il faut recuperer les droits ('' par defaut signifie tous les droits)
|
||||
* @param string $moduletag Name of module we want permissions ('' means all)
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function getrights($moduletag='')
|
||||
|
||||
Reference in New Issue
Block a user