Fix look and feel v6

This commit is contained in:
Laurent Destailleur 2017-09-17 20:05:36 +02:00
parent dece156a99
commit 41e19e723b
6 changed files with 63 additions and 37 deletions

View File

@ -259,7 +259,7 @@ if ($id > 0 || ! empty($ref))
{
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"].'&withproject='.$withproject,$langs->trans("DeleteATask"),$langs->trans("ConfirmDeleteATask"),"confirm_delete");
}
if (! GETPOST('withproject') || empty($projectstatic->id))
{
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,1);
@ -286,14 +286,14 @@ if ($id > 0 || ! empty($ref))
}
dol_banner_tab($task, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param);
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">';
// Nb comments
print '<td class="tdtop">'.$langs->trans("TaskNbComments").'</td><td>';
print '<td class="titlefield">'.$langs->trans("TaskNbComments").'</td><td>';
print $task->getNbComments();
print '</td></tr>';
@ -307,46 +307,46 @@ if ($id > 0 || ! empty($ref))
print '</div>';
dol_fiche_end();
print '<br>';
print '<div id="comment">';
// Add comment
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$task->id.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="addcomment">';
print '<input type="hidden" name="id" value="'.$task->id.'">';
print '<input type="hidden" name="withproject" value="'.$withproject.'">';
print '<table class="noborder nohover" width="100%">';
print '<tr class="liste_titre">';
print '<td width="25%">'.$langs->trans("Comments").'</td>';
print '<td width="25%"></td>';
print '<td width="25%"></td>';
print '<td width="25%"></td>';
print "</tr>\n";
print '<tr class="oddeven">';
print '<td></td>';
// Description
print '<td colspan="2">';
$desc = ($_POST['comment_description']?$_POST['comment_description']:'');
$doleditor = new DolEditor('comment_description', $desc, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '100%');
print $doleditor->Create(1);
print '</td>';
print '<td align="center">';
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
print '</td></tr>';
print '</table></form>';
// List of comments
if(!empty($task->comments)) {
// Default color for current user
@ -367,7 +367,7 @@ if ($id > 0 || ! empty($ref))
if($comment->fk_user == $user->id) {
print '<div class="width25p float">&nbsp;</div>';
}
print '<div class="width75p float comment comment-table" style="background-color:#'.$TColors[$fk_user]['bgcolor'].'">';
print '<div class="comment-info comment-cell">';
if (! empty($user->photo))
@ -377,7 +377,7 @@ if ($id > 0 || ! empty($ref))
print $langs->trans('User').' : '.$userstatic->getNomUrl().'<br/>';
print $langs->trans('Date').' : '.dol_print_date($comment->datec,'dayhoursec');
print '</div>'; // End comment-info
print '<div class="comment-cell comment-right">';
print '<div class="comment-table width100p">';
print '<div class="comment-description comment-cell">';
@ -391,17 +391,17 @@ if ($id > 0 || ! empty($ref))
print '</div>'; // End comment-table
print '</div>'; // End comment-right
print '</div>'; // End comment
if($comment->fk_user != $user->id) {
print '<div class="width25p float">&nbsp;</div>';
}
print '<div class="clearboth"></div>';
print '</div>'; // end 100p
$first = false;
}
}
print '<br>';
print '</div>';

View File

@ -187,7 +187,7 @@ if ($id > 0 || ! empty($ref))
// 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':'');
@ -272,8 +272,11 @@ if ($id > 0 || ! empty($ref))
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');

View File

@ -130,7 +130,8 @@ if ($object->id > 0)
// 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':'');
@ -215,6 +216,8 @@ if ($object->id > 0)
print '<div class="clearboth"></div>';
dol_fiche_end();
print '<br>';
}
$head = task_prepare_head($object);

View File

@ -110,7 +110,7 @@ if ($object->id > 0)
// 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
@ -194,6 +194,8 @@ if ($object->id > 0)
print '<div class="clearboth"></div>';
dol_fiche_end();
print '<br>';
}
$head = task_prepare_head($object);

View File

@ -279,6 +279,7 @@ if ($id > 0 || ! empty($ref))
print '</table>';
print '</div>';
print '<div class="fichehalfright">';
print '<div class="ficheaddleft">';
print '<div class="underbanner clearboth"></div>';
@ -468,6 +469,7 @@ if ($id > 0 || ! empty($ref))
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%">';
@ -490,8 +492,21 @@ if ($id > 0 || ! empty($ref))
}
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.' %';
@ -506,12 +521,7 @@ if ($id > 0 || ! empty($ref))
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
@ -522,6 +532,10 @@ if ($id > 0 || ! empty($ref))
print '</table>';
print '</div>';
print '</div>';
print '</div>';
print '<div class="clearboth"></div>';
dol_fiche_end();
}

View File

@ -418,6 +418,10 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
print '</div>';
}
else
{
print '<br>';
}
}
}
@ -442,7 +446,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
else $object->next_prev_filter=" fk_projet = ".$projectstatic->id;
$morehtmlref='';
// Project
if (empty($withproject))
{
@ -450,7 +454,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
$morehtmlref.=$langs->trans("Project").': ';
$morehtmlref.=$projectstatic->getNomUrl(1);
$morehtmlref.='<br>';
// Third party
$morehtmlref.=$langs->trans("ThirdParty").': ';
if (is_object($projectstatic->thirdparty)) {
@ -464,7 +468,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
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
@ -491,7 +495,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
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>';
@ -503,7 +507,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
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>';