Skip to content

Commit

Permalink
Cherry pick
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Sep 17, 2017
1 parent 39acb46 commit bb73da4
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 15 deletions.
5 changes: 4 additions & 1 deletion htdocs/projet/tasks/contact.php
Expand Up @@ -187,7 +187,7 @@
// Tabs for project
$tab='tasks';
$head=project_prepare_head($projectstatic);
dol_fiche_head($head, $tab, $langs->trans("Project"),0,($projectstatic->public?'projectpub':'project'));
dol_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public?'projectpub':'project'));

$param=($mode=='mine'?'&mode=mine':'');

Expand Down Expand Up @@ -272,8 +272,11 @@
print '<div class="clearboth"></div>';

dol_fiche_end();

print '<br>';
}


// To verify role of users
//$userAccess = $projectstatic->restrictedProjectArea($user); // We allow task affected to user even if a not allowed project
//$arrayofuseridoftask=$object->getListContactId('internal');
Expand Down
5 changes: 4 additions & 1 deletion htdocs/projet/tasks/document.php
Expand Up @@ -130,7 +130,8 @@
// Tabs for project
$tab='tasks';
$head=project_prepare_head($projectstatic);
dol_fiche_head($head, $tab, $langs->trans("Project"),0,($projectstatic->public?'projectpub':'project'));

dol_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public?'projectpub':'project'));

$param=($mode=='mine'?'&mode=mine':'');

Expand Down Expand Up @@ -215,6 +216,8 @@
print '<div class="clearboth"></div>';

dol_fiche_end();

print '<br>';
}

$head = task_prepare_head($object);
Expand Down
4 changes: 3 additions & 1 deletion htdocs/projet/tasks/note.php
Expand Up @@ -110,7 +110,7 @@
// Tabs for project
$tab='tasks';
$head=project_prepare_head($projectstatic);
dol_fiche_head($head, $tab, $langs->trans("Project"), 0, ($projectstatic->public?'projectpub':'project'));
dol_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public?'projectpub':'project'));

$param=($mode=='mine'?'&mode=mine':'');
// Project card
Expand Down Expand Up @@ -194,6 +194,8 @@
print '<div class="clearboth"></div>';

dol_fiche_end();

print '<br>';
}

$head = task_prepare_head($object);
Expand Down
28 changes: 21 additions & 7 deletions htdocs/projet/tasks/task.php
Expand Up @@ -279,6 +279,7 @@
print '</table>';

print '</div>';

print '<div class="fichehalfright">';
print '<div class="ficheaddleft">';
print '<div class="underbanner clearboth"></div>';
Expand Down Expand Up @@ -468,6 +469,7 @@
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param);

print '<div class="fichecenter">';
print '<div class="fichehalfleft">';

print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">';
Expand All @@ -490,8 +492,21 @@
}
print '</td></tr>';

// Description
print '<td class="tdtop">'.$langs->trans("Description").'</td><td colspan="3">';
print nl2br($object->description);
print '</td></tr>';

print '</table>';
print '</div>';

print '<div class="fichehalfright"><div class="ficheaddleft">';

print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">';

// Progress declared
print '<tr><td>'.$langs->trans("ProgressDeclared").'</td><td colspan="3">';
print '<tr><td class="titlefield">'.$langs->trans("ProgressDeclared").'</td><td colspan="3">';
if ($object->progress != '')
{
print $object->progress.' %';
Expand All @@ -506,12 +521,7 @@
if ($tmparray['total_duration'] > 0 && ! empty($object->planned_workload)) print round($tmparray['total_duration'] / $object->planned_workload * 100, 2).' %';
else print '0 %';
}
else print '';
print '</td></tr>';

// Description
print '<td class="tdtop">'.$langs->trans("Description").'</td><td colspan="3">';
print nl2br($object->description);
else print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>';
print '</td></tr>';

// Other attributes
Expand All @@ -522,6 +532,10 @@
print '</table>';

print '</div>';
print '</div>';

print '</div>';
print '<div class="clearboth"></div>';

dol_fiche_end();
}
Expand Down
14 changes: 9 additions & 5 deletions htdocs/projet/tasks/time.php
Expand Up @@ -418,6 +418,10 @@

print '</div>';
}
else
{
print '<br>';
}
}
}

Expand All @@ -442,15 +446,15 @@
else $object->next_prev_filter=" fk_projet = ".$projectstatic->id;

$morehtmlref='';

// Project
if (empty($withproject))
{
$morehtmlref.='<div class="refidno">';
$morehtmlref.=$langs->trans("Project").': ';
$morehtmlref.=$projectstatic->getNomUrl(1);
$morehtmlref.='<br>';

// Third party
$morehtmlref.=$langs->trans("ThirdParty").': ';
if (is_object($projectstatic->thirdparty)) {
Expand All @@ -464,7 +468,7 @@
print '<div class="fichecenter">';
print '<div class="fichehalfleft">';

print '<div class="underbanner clearboth"></div>';
print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">';

// Date start - Date end
Expand All @@ -491,7 +495,7 @@
print '<table class="border" width="100%">';

// Progress declared
print '<tr><td>'.$langs->trans("ProgressDeclared").'</td><td>';
print '<tr><td class="titlefield">'.$langs->trans("ProgressDeclared").'</td><td>';
print $object->progress.' %';
print '</td></tr>';

Expand All @@ -503,7 +507,7 @@
if ($tmparray['total_duration'] > 0) print round($tmparray['total_duration']/$object->planned_workload*100, 2).' %';
else print '0 %';
}
else print '';
else print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>';
print '</td></tr>';

print '</table>';
Expand Down

0 comments on commit bb73da4

Please sign in to comment.