Clean code
This commit is contained in:
parent
f4a52470e3
commit
063cf15bcb
@ -358,7 +358,7 @@ function project_admin_prepare_head()
|
||||
*/
|
||||
function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$taskrole, $projectsListId = '', $addordertick = 0, $projectidfortotallink = 0, $filterprogresscalc = '', $showbilltime = 0)
|
||||
{
|
||||
global $user, $bc, $langs, $conf, $db;
|
||||
global $user, $langs, $conf, $db;
|
||||
global $projectstatic, $taskstatic;
|
||||
|
||||
$lastprojectid = 0;
|
||||
@ -450,7 +450,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
||||
$lastprojectid = $lines[$i]->fk_project;
|
||||
}
|
||||
|
||||
print '<tr '.$bc[$var].' id="row-'.$lines[$i]->id.'">'."\n";
|
||||
print '<tr class="oddeven" id="row-'.$lines[$i]->id.'">'."\n";
|
||||
|
||||
$projectstatic->id = $lines[$i]->fk_project;
|
||||
$projectstatic->ref = $lines[$i]->projectref;
|
||||
@ -758,7 +758,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
||||
*/
|
||||
function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, $preselectedday, &$isavailable, $oldprojectforbreak = 0)
|
||||
{
|
||||
global $conf, $db, $user, $bc, $langs;
|
||||
global $conf, $db, $user, $langs;
|
||||
global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic;
|
||||
|
||||
$lastprojectid = 0;
|
||||
@ -986,7 +986,7 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec
|
||||
*/
|
||||
function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, $preselectedday, &$isavailable, $oldprojectforbreak = 0, $arrayfields = array(), $extrafields = null)
|
||||
{
|
||||
global $conf, $db, $user, $bc, $langs;
|
||||
global $conf, $db, $user, $langs;
|
||||
global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic;
|
||||
|
||||
$lastprojectid = 0;
|
||||
@ -1177,15 +1177,12 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
||||
// Ref
|
||||
print '<td>';
|
||||
print '<!-- Task id = '.$lines[$i]->id.' -->';
|
||||
for ($k = 0; $k < $level; $k++) print " ";
|
||||
for ($k = 0; $k < $level; $k++) print '<div class="marginleftonly">';
|
||||
print $taskstatic->getNomUrl(1, 'withproject', 'time');
|
||||
// Label task
|
||||
print '<br>';
|
||||
for ($k = 0; $k < $level; $k++) print " ";
|
||||
print $taskstatic->label;
|
||||
//print "<br>";
|
||||
//for ($k = 0 ; $k < $level ; $k++) print " ";
|
||||
//print get_date_range($lines[$i]->date_start,$lines[$i]->date_end,'',$langs,0);
|
||||
print '<span class="opacitymedium">'.$taskstatic->label.'</a>';
|
||||
for ($k = 0; $k < $level; $k++) print "</div>";
|
||||
print "</td>\n";
|
||||
|
||||
// TASK extrafields
|
||||
@ -1365,7 +1362,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
||||
*/
|
||||
function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, &$isavailable, $oldprojectforbreak = 0, $arrayfields = array(), $extrafields = null)
|
||||
{
|
||||
global $conf, $db, $user, $bc, $langs;
|
||||
global $conf, $db, $user, $langs;
|
||||
global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic;
|
||||
|
||||
$numlines = count($lines);
|
||||
@ -1556,16 +1553,12 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
||||
// Ref
|
||||
print '<td class="nowrap">';
|
||||
print '<!-- Task id = '.$lines[$i]->id.' -->';
|
||||
for ($k = 0; $k < $level; $k++) print " ";
|
||||
for ($k = 0; $k < $level; $k++) print '<div class="marginleftonly">';
|
||||
print $taskstatic->getNomUrl(1, 'withproject', 'time');
|
||||
// Label task
|
||||
print '<br>';
|
||||
for ($k = 0; $k < $level; $k++) print " ";
|
||||
//print $taskstatic->getNomUrl(0, 'withproject', 'time');
|
||||
print $taskstatic->label;
|
||||
//print "<br>";
|
||||
//for ($k = 0 ; $k < $level ; $k++) print " ";
|
||||
//print get_date_range($lines[$i]->date_start,$lines[$i]->date_end,'',$langs,0);
|
||||
print '<span class="opacitymedium">'.$taskstatic->label.'</span>';
|
||||
for ($k = 0; $k < $level; $k++) print "</div>";
|
||||
print "</td>\n";
|
||||
|
||||
// TASK extrafields
|
||||
@ -1732,7 +1725,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
||||
*/
|
||||
function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, &$isavailable, $oldprojectforbreak = 0, $TWeek = array())
|
||||
{
|
||||
global $conf, $db, $user, $bc, $langs;
|
||||
global $conf, $db, $user, $langs;
|
||||
global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic;
|
||||
|
||||
$numlines = count($lines);
|
||||
@ -1840,16 +1833,12 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &
|
||||
// Ref
|
||||
print '<td class="nowrap">';
|
||||
print '<!-- Task id = '.$lines[$i]->id.' -->';
|
||||
for ($k = 0; $k < $level; $k++) print " ";
|
||||
for ($k = 0; $k < $level; $k++) print '<div class="marginleftonly">';
|
||||
print $taskstatic->getNomUrl(1, 'withproject', 'time');
|
||||
// Label task
|
||||
print '<br>';
|
||||
for ($k = 0; $k < $level; $k++) print " ";
|
||||
//print $taskstatic->getNomUrl(0, 'withproject', 'time');
|
||||
print $taskstatic->label;
|
||||
//print "<br>";
|
||||
//for ($k = 0 ; $k < $level ; $k++) print " ";
|
||||
//print get_date_range($lines[$i]->date_start,$lines[$i]->date_end,'',$langs,0);
|
||||
print '<span class="opacitymedium">'.$taskstatic->label.'</span>';
|
||||
for ($k = 0; $k < $level; $k++) print "</div>";
|
||||
print "</td>\n";
|
||||
|
||||
// Planned Workload
|
||||
@ -1917,7 +1906,7 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &
|
||||
$alttitle = $langs->trans("AddHereTimeSpentForWeek", $weekNb);
|
||||
|
||||
|
||||
$tableCell = '<td align="center" class="hide">';
|
||||
$tableCell = '<td class="center hide weekend">';
|
||||
$placeholder = '';
|
||||
if ($alreadyspent)
|
||||
{
|
||||
@ -2029,7 +2018,7 @@ function searchTaskInChild(&$inc, $parent, &$lines, &$taskrole)
|
||||
*/
|
||||
function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks = 0, $status = -1, $listofoppstatus = array(), $hiddenfields = array())
|
||||
{
|
||||
global $langs, $conf, $user, $bc;
|
||||
global $langs, $conf, $user;
|
||||
global $theme_datacolor;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
|
||||
@ -298,12 +298,14 @@ td.onholidaymorning, td.onholidayafternoon {
|
||||
td.onholidayallday {
|
||||
background-color: #f4eede;
|
||||
}
|
||||
/*
|
||||
td.leftborder, td.hide0 {
|
||||
border-left: 1px solid #ccc;
|
||||
}
|
||||
td.leftborder, td.hide6 {
|
||||
border-right: 1px solid #ccc;
|
||||
}
|
||||
*/
|
||||
td.rightborder {
|
||||
border-right: 1px solid #ccc;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user