From 41e19e723bd56111de7e090c4c177ade0ecb3cbc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 17 Sep 2017 20:05:36 +0200 Subject: [PATCH] Fix look and feel v6 --- htdocs/projet/tasks/comment.php | 44 ++++++++++++++++---------------- htdocs/projet/tasks/contact.php | 5 +++- htdocs/projet/tasks/document.php | 5 +++- htdocs/projet/tasks/note.php | 4 ++- htdocs/projet/tasks/task.php | 28 +++++++++++++++----- htdocs/projet/tasks/time.php | 14 ++++++---- 6 files changed, 63 insertions(+), 37 deletions(-) diff --git a/htdocs/projet/tasks/comment.php b/htdocs/projet/tasks/comment.php index 3ee3cf2593b..a36337c324d 100644 --- a/htdocs/projet/tasks/comment.php +++ b/htdocs/projet/tasks/comment.php @@ -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 '
'; print '
'; print ''; - + // Nb comments - print ''; @@ -307,46 +307,46 @@ if ($id > 0 || ! empty($ref)) print ''; dol_fiche_end(); - - + + print '
'; print '
'; - + // Add comment - + print '
'; print ''; print ''; print ''; print ''; - + print '
'.$langs->trans("TaskNbComments").''; + print ''.$langs->trans("TaskNbComments").''; print $task->getNbComments(); print '
'; - + print ''; print ''; print ''; print ''; print ''; print "\n"; - + print ''; print ''; - + // Description print ''; - + print ''; print '
'.$langs->trans("Comments").'
'; - + $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 ''; print ''; print '
'; - + // 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 '
 
'; } - + print '
'; print '
'; if (! empty($user->photo)) @@ -377,7 +377,7 @@ if ($id > 0 || ! empty($ref)) print $langs->trans('User').' : '.$userstatic->getNomUrl().'
'; print $langs->trans('Date').' : '.dol_print_date($comment->datec,'dayhoursec'); print '
'; // End comment-info - + print '
'; print '
'; print '
'; @@ -391,17 +391,17 @@ if ($id > 0 || ! empty($ref)) print '
'; // End comment-table print '
'; // End comment-right print '
'; // End comment - + if($comment->fk_user != $user->id) { print '
 
'; } print '
'; print '
'; // end 100p - + $first = false; } } - + print '
'; print '
'; diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index d4029847534..3d834fe28b6 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -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 '
'; dol_fiche_end(); + + print '
'; } + // 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'); diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index 649e1efd575..f6f206f90ec 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -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 '
'; dol_fiche_end(); + + print '
'; } $head = task_prepare_head($object); diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index 13a8979ae91..87d949eb645 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -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 '
'; dol_fiche_end(); + + print '
'; } $head = task_prepare_head($object); diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 1b43940029f..db56534f851 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -279,6 +279,7 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; + print '
'; print '
'; print '
'; @@ -468,6 +469,7 @@ if ($id > 0 || ! empty($ref)) dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param); print '
'; + print '
'; print '
'; print ''; @@ -490,8 +492,21 @@ if ($id > 0 || ! empty($ref)) } print ''; + // Description + print ''; + + print '
'.$langs->trans("Description").''; + print nl2br($object->description); + print '
'; + print '
'; + + print '
'; + + print '
'; + print ''; + // Progress declared - print ''; - - // Description - print ''; // Other attributes @@ -522,6 +532,10 @@ if ($id > 0 || ! empty($ref)) print '
'.$langs->trans("ProgressDeclared").''; + print '
'.$langs->trans("ProgressDeclared").''; 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 '
'.$langs->trans("Description").''; - print nl2br($object->description); + else print ''.$langs->trans("WorkloadNotDefined").''; print '
'; print '
'; + print '
'; + + print '
'; + print '
'; dol_fiche_end(); } diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 8b85c299fdc..b3bbccfcb4e 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -418,6 +418,10 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) print '
'; } + else + { + print '
'; + } } } @@ -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.='
'; - + // Third party $morehtmlref.=$langs->trans("ThirdParty").': '; if (is_object($projectstatic->thirdparty)) { @@ -464,7 +468,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) print '
'; print '
'; - print '
'; + print '
'; print ''; // Date start - Date end @@ -491,7 +495,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) print '
'; // Progress declared - print ''; @@ -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 ''.$langs->trans("WorkloadNotDefined").''; print ''; print '
'.$langs->trans("ProgressDeclared").''; + print '
'.$langs->trans("ProgressDeclared").''; print $object->progress.' %'; print '
';