Option PROJECT_LINES_PERxxx_SHOW_THIRDPARTY is the default

This commit is contained in:
Laurent Destailleur 2017-10-09 18:18:34 +02:00
parent 4de1ade605
commit 9427655dd0
3 changed files with 18 additions and 32 deletions

View File

@ -663,15 +663,12 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
print $projectstatic->getNomUrl(1,'',0,$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]);
print "</td>";
if (! empty($conf->global->PROJECT_LINES_PERDAY_SHOW_THIRDPARTY))
{
// Thirdparty
print '<td class="tdoverflowmax100">';
$thirdpartystatic->id=$lines[$i]->socid;
$thirdpartystatic->name=$lines[$i]->thirdparty_name;
print $thirdpartystatic->getNomUrl(1, 'project', 10);
print '</td>';
}
// Thirdparty
print '<td class="tdoverflowmax100">';
$thirdpartystatic->id=$lines[$i]->socid;
$thirdpartystatic->name=$lines[$i]->thirdparty_name;
print $thirdpartystatic->getNomUrl(1, 'project', 10);
print '</td>';
// Ref
print '<td>';
@ -897,15 +894,12 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
print $projectstatic->getNomUrl(1,'',0,$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]);
print "</td>";
if (! empty($conf->global->PROJECT_LINES_PERWEEK_SHOW_THIRDPARTY))
{
// Thirdparty
print '<td class="tdoverflowmax100">';
$thirdpartystatic->id=$lines[$i]->thirdparty_id;
$thirdpartystatic->name=$lines[$i]->thirdparty_name;
print $thirdpartystatic->getNomUrl(1, 'project');
print '</td>';
}
// Thirdparty
print '<td class="tdoverflowmax100">';
$thirdpartystatic->id=$lines[$i]->thirdparty_id;
$thirdpartystatic->name=$lines[$i]->thirdparty_name;
print $thirdpartystatic->getNomUrl(1, 'project');
print '</td>';
// Ref
print '<td class="nowrap">';

View File

@ -444,7 +444,7 @@ print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"")
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre"><input type="text" size="4" name="search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>';
if (! empty($conf->global->PROJECT_LINES_PERDAY_SHOW_THIRDPARTY)) print '<td class="liste_titre"><input type="text" size="4" name="search_thirdparty" value="'.dol_escape_htmltag($search_thirdparty).'"></td>';
print '<td class="liste_titre"><input type="text" size="4" name="search_thirdparty" value="'.dol_escape_htmltag($search_thirdparty).'"></td>';
print '<td class="liste_titre"><input type="text" size="4" name="search_task_ref" value="'.dol_escape_htmltag($search_task_ref).'"></td>';
print '<td class="liste_titre"><input type="text" size="4" name="search_task_label" value="'.dol_escape_htmltag($search_task_label).'"></td>';
print '<td class="liste_titre"></td>';
@ -463,10 +463,7 @@ print "</tr>\n";
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("ProjectRef").'</td>';
if (! empty($conf->global->PROJECT_LINES_PERDAY_SHOW_THIRDPARTY))
{
print '<td>'.$langs->trans("ThirdParty").'</td>';
}
print '<td>'.$langs->trans("ThirdParty").'</td>';
print '<td>'.$langs->trans("RefTask").'</td>';
print '<td>'.$langs->trans("LabelTask").'</td>';
print '<td align="right" class="maxwidth100">'.$langs->trans("PlannedWorkload").'</td>';
@ -498,8 +495,7 @@ if (count($tasksarray) > 0)
$j=0;
projectLinesPerDay($j, 0, $usertoprocess, $tasksarray, $level, $projectsrole, $tasksrole, $mine, $restrictviewformytask, $daytoparse, $isavailable);
$colspan = 8;
if (! empty($conf->global->PROJECT_LINES_PERDAY_SHOW_THIRDPARTY)) $colspan++;
$colspan = 9;
print '<tr class="liste_total">
<td class="liste_total" colspan="'.$colspan.'">';

View File

@ -440,7 +440,7 @@ print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"")
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre"><input type="text" size="4" name="search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>';
if (! empty($conf->global->PROJECT_LINES_PERWEEK_SHOW_THIRDPARTY)) print '<td class="liste_titre"><input type="text" size="4" name="search_thirdparty" value="'.dol_escape_htmltag($search_thirdparty).'"></td>';
print '<td class="liste_titre"><input type="text" size="4" name="search_thirdparty" value="'.dol_escape_htmltag($search_thirdparty).'"></td>';
print '<td class="liste_titre"><input type="text" size="4" name="search_task_ref" value="'.dol_escape_htmltag($search_task_ref).'"></td>';
print '<td class="liste_titre"><input type="text" size="4" name="search_task_label" value="'.dol_escape_htmltag($search_task_label).'"></td>';
print '<td class="liste_titre"></td>';
@ -460,10 +460,7 @@ print "</tr>\n";
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("ProjectRef").'</td>';
if (! empty($conf->global->PROJECT_LINES_PERWEEK_SHOW_THIRDPARTY))
{
print '<td>'.$langs->trans("ThirdParty").'</td>';
}
print '<td>'.$langs->trans("ThirdParty").'</td>';
print '<td>'.$langs->trans("RefTask").'</td>';
print '<td>'.$langs->trans("LabelTask").'</td>';
print '<td align="right" class="maxwidth75">'.$langs->trans("PlannedWorkload").'</td>';
@ -511,8 +508,7 @@ if (count($tasksarray) > 0)
$level=0;
projectLinesPerWeek($j, $firstdaytoshow, $usertoprocess, 0, $tasksarray, $level, $projectsrole, $tasksrole, $mine, $restrictviewformytask, $isavailable);
$colspan=7;
if (! empty($conf->global->PROJECT_LINES_PERWEEK_SHOW_THIRDPARTY)) $colspan++;
$colspan=8;
print '<tr class="liste_total">
<td class="liste_total" colspan="'.$colspan.'">';