Fix look and feel v6
This commit is contained in:
parent
dece156a99
commit
41e19e723b
@ -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");
|
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))
|
if (! GETPOST('withproject') || empty($projectstatic->id))
|
||||||
{
|
{
|
||||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,1);
|
$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);
|
dol_banner_tab($task, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param);
|
||||||
|
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Nb comments
|
// Nb comments
|
||||||
print '<td class="tdtop">'.$langs->trans("TaskNbComments").'</td><td>';
|
print '<td class="titlefield">'.$langs->trans("TaskNbComments").'</td><td>';
|
||||||
print $task->getNbComments();
|
print $task->getNbComments();
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -307,46 +307,46 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<div id="comment">';
|
print '<div id="comment">';
|
||||||
|
|
||||||
// Add comment
|
// Add comment
|
||||||
|
|
||||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$task->id.'">';
|
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="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="addcomment">';
|
print '<input type="hidden" name="action" value="addcomment">';
|
||||||
print '<input type="hidden" name="id" value="'.$task->id.'">';
|
print '<input type="hidden" name="id" value="'.$task->id.'">';
|
||||||
print '<input type="hidden" name="withproject" value="'.$withproject.'">';
|
print '<input type="hidden" name="withproject" value="'.$withproject.'">';
|
||||||
|
|
||||||
print '<table class="noborder nohover" width="100%">';
|
print '<table class="noborder nohover" width="100%">';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td width="25%">'.$langs->trans("Comments").'</td>';
|
print '<td width="25%">'.$langs->trans("Comments").'</td>';
|
||||||
print '<td width="25%"></td>';
|
print '<td width="25%"></td>';
|
||||||
print '<td width="25%"></td>';
|
print '<td width="25%"></td>';
|
||||||
print '<td width="25%"></td>';
|
print '<td width="25%"></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
print '<td colspan="2">';
|
print '<td colspan="2">';
|
||||||
|
|
||||||
$desc = ($_POST['comment_description']?$_POST['comment_description']:'');
|
$desc = ($_POST['comment_description']?$_POST['comment_description']:'');
|
||||||
|
|
||||||
$doleditor = new DolEditor('comment_description', $desc, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '100%');
|
$doleditor = new DolEditor('comment_description', $desc, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '100%');
|
||||||
print $doleditor->Create(1);
|
print $doleditor->Create(1);
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '</table></form>';
|
print '</table></form>';
|
||||||
|
|
||||||
// List of comments
|
// List of comments
|
||||||
if(!empty($task->comments)) {
|
if(!empty($task->comments)) {
|
||||||
// Default color for current user
|
// Default color for current user
|
||||||
@ -367,7 +367,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
if($comment->fk_user == $user->id) {
|
if($comment->fk_user == $user->id) {
|
||||||
print '<div class="width25p float"> </div>';
|
print '<div class="width25p float"> </div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<div class="width75p float comment comment-table" style="background-color:#'.$TColors[$fk_user]['bgcolor'].'">';
|
print '<div class="width75p float comment comment-table" style="background-color:#'.$TColors[$fk_user]['bgcolor'].'">';
|
||||||
print '<div class="comment-info comment-cell">';
|
print '<div class="comment-info comment-cell">';
|
||||||
if (! empty($user->photo))
|
if (! empty($user->photo))
|
||||||
@ -377,7 +377,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print $langs->trans('User').' : '.$userstatic->getNomUrl().'<br/>';
|
print $langs->trans('User').' : '.$userstatic->getNomUrl().'<br/>';
|
||||||
print $langs->trans('Date').' : '.dol_print_date($comment->datec,'dayhoursec');
|
print $langs->trans('Date').' : '.dol_print_date($comment->datec,'dayhoursec');
|
||||||
print '</div>'; // End comment-info
|
print '</div>'; // End comment-info
|
||||||
|
|
||||||
print '<div class="comment-cell comment-right">';
|
print '<div class="comment-cell comment-right">';
|
||||||
print '<div class="comment-table width100p">';
|
print '<div class="comment-table width100p">';
|
||||||
print '<div class="comment-description comment-cell">';
|
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-table
|
||||||
print '</div>'; // End comment-right
|
print '</div>'; // End comment-right
|
||||||
print '</div>'; // End comment
|
print '</div>'; // End comment
|
||||||
|
|
||||||
if($comment->fk_user != $user->id) {
|
if($comment->fk_user != $user->id) {
|
||||||
print '<div class="width25p float"> </div>';
|
print '<div class="width25p float"> </div>';
|
||||||
}
|
}
|
||||||
print '<div class="clearboth"></div>';
|
print '<div class="clearboth"></div>';
|
||||||
print '</div>'; // end 100p
|
print '</div>'; // end 100p
|
||||||
|
|
||||||
$first = false;
|
$first = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|||||||
@ -187,7 +187,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
// Tabs for project
|
// Tabs for project
|
||||||
$tab='tasks';
|
$tab='tasks';
|
||||||
$head=project_prepare_head($projectstatic);
|
$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':'');
|
$param=($mode=='mine'?'&mode=mine':'');
|
||||||
|
|
||||||
@ -272,8 +272,11 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<div class="clearboth"></div>';
|
print '<div class="clearboth"></div>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// To verify role of users
|
// To verify role of users
|
||||||
//$userAccess = $projectstatic->restrictedProjectArea($user); // We allow task affected to user even if a not allowed project
|
//$userAccess = $projectstatic->restrictedProjectArea($user); // We allow task affected to user even if a not allowed project
|
||||||
//$arrayofuseridoftask=$object->getListContactId('internal');
|
//$arrayofuseridoftask=$object->getListContactId('internal');
|
||||||
|
|||||||
@ -130,7 +130,8 @@ if ($object->id > 0)
|
|||||||
// Tabs for project
|
// Tabs for project
|
||||||
$tab='tasks';
|
$tab='tasks';
|
||||||
$head=project_prepare_head($projectstatic);
|
$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':'');
|
$param=($mode=='mine'?'&mode=mine':'');
|
||||||
|
|
||||||
@ -215,6 +216,8 @@ if ($object->id > 0)
|
|||||||
print '<div class="clearboth"></div>';
|
print '<div class="clearboth"></div>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$head = task_prepare_head($object);
|
$head = task_prepare_head($object);
|
||||||
|
|||||||
@ -110,7 +110,7 @@ if ($object->id > 0)
|
|||||||
// Tabs for project
|
// Tabs for project
|
||||||
$tab='tasks';
|
$tab='tasks';
|
||||||
$head=project_prepare_head($projectstatic);
|
$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':'');
|
$param=($mode=='mine'?'&mode=mine':'');
|
||||||
// Project card
|
// Project card
|
||||||
@ -194,6 +194,8 @@ if ($object->id > 0)
|
|||||||
print '<div class="clearboth"></div>';
|
print '<div class="clearboth"></div>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$head = task_prepare_head($object);
|
$head = task_prepare_head($object);
|
||||||
|
|||||||
@ -279,6 +279,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '<div class="fichehalfright">';
|
print '<div class="fichehalfright">';
|
||||||
print '<div class="ficheaddleft">';
|
print '<div class="ficheaddleft">';
|
||||||
print '<div class="underbanner clearboth"></div>';
|
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);
|
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param);
|
||||||
|
|
||||||
print '<div class="fichecenter">';
|
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%">';
|
print '<table class="border" width="100%">';
|
||||||
@ -490,8 +492,21 @@ if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
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
|
// 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 != '')
|
if ($object->progress != '')
|
||||||
{
|
{
|
||||||
print $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).' %';
|
if ($tmparray['total_duration'] > 0 && ! empty($object->planned_workload)) print round($tmparray['total_duration'] / $object->planned_workload * 100, 2).' %';
|
||||||
else print '0 %';
|
else print '0 %';
|
||||||
}
|
}
|
||||||
else print '';
|
else print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>';
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Description
|
|
||||||
print '<td class="tdtop">'.$langs->trans("Description").'</td><td colspan="3">';
|
|
||||||
print nl2br($object->description);
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
@ -522,6 +532,10 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
print '<div class="clearboth"></div>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -418,6 +418,10 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
|
|||||||
|
|
||||||
print '</div>';
|
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;
|
else $object->next_prev_filter=" fk_projet = ".$projectstatic->id;
|
||||||
|
|
||||||
$morehtmlref='';
|
$morehtmlref='';
|
||||||
|
|
||||||
// Project
|
// Project
|
||||||
if (empty($withproject))
|
if (empty($withproject))
|
||||||
{
|
{
|
||||||
@ -450,7 +454,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
|
|||||||
$morehtmlref.=$langs->trans("Project").': ';
|
$morehtmlref.=$langs->trans("Project").': ';
|
||||||
$morehtmlref.=$projectstatic->getNomUrl(1);
|
$morehtmlref.=$projectstatic->getNomUrl(1);
|
||||||
$morehtmlref.='<br>';
|
$morehtmlref.='<br>';
|
||||||
|
|
||||||
// Third party
|
// Third party
|
||||||
$morehtmlref.=$langs->trans("ThirdParty").': ';
|
$morehtmlref.=$langs->trans("ThirdParty").': ';
|
||||||
if (is_object($projectstatic->thirdparty)) {
|
if (is_object($projectstatic->thirdparty)) {
|
||||||
@ -464,7 +468,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
|
|||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
print '<div class="fichehalfleft">';
|
print '<div class="fichehalfleft">';
|
||||||
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Date start - Date end
|
// Date start - Date end
|
||||||
@ -491,7 +495,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
|
|||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Progress declared
|
// Progress declared
|
||||||
print '<tr><td>'.$langs->trans("ProgressDeclared").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("ProgressDeclared").'</td><td>';
|
||||||
print $object->progress.' %';
|
print $object->progress.' %';
|
||||||
print '</td></tr>';
|
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).' %';
|
if ($tmparray['total_duration'] > 0) print round($tmparray['total_duration']/$object->planned_workload*100, 2).' %';
|
||||||
else print '0 %';
|
else print '0 %';
|
||||||
}
|
}
|
||||||
else print '';
|
else print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user