Merge remote-tracking branch 'Dolibarr/10.0' into 10.0

This commit is contained in:
Nicolas ZABOURI 2019-06-17 10:55:39 +02:00
commit d0456d2ee6
2 changed files with 10 additions and 5 deletions

View File

@ -667,7 +667,7 @@ elseif ($id > 0 || ! empty($ref))
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
$title=$langs->trans("ListOfTasks");
$linktotasks = dolGetButtonTitle($langs->trans('GoToGanttView'), '', 'fa fa-calendar-minus-o', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1');
$linktotasks = dolGetButtonTitle($langs->trans('GoToGanttView'), '', 'fa fa-calendar-minus-o paddingleft', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1');
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'title_generic.png', 0, '', '', 0, 1);
print load_fiche_titre($title, $linktotasks.' &nbsp; '.$linktocreatetask, 'title_generic.png');

View File

@ -467,7 +467,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
$object->project = clone $projectstatic;
}
$userWrite = $projectstatic->restrictedProjectArea($user, 'write');
$userRead = $projectstatic->restrictedProjectArea($user, 'read');
$linktocreatetime = '';
if ($projectstatic->id > 0)
@ -582,9 +582,9 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
$linktocreatetimeBtnStatus = 0;
$linktocreatetimeUrl = '';
$linktocreatetimeHelpText = '';
if ($user->rights->projet->all->creer || $user->rights->projet->creer)
if ($user->rights->projet->all->lire || $user->rights->projet->lire) // To enter time, read permission is enough
{
if ($projectstatic->public || $userWrite > 0)
if ($projectstatic->public || $userRead > 0)
{
$linktocreatetimeBtnStatus = 1;
@ -1017,7 +1017,12 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
// Duration - Time spent
print '<td>';
print $form->select_duration('timespent_duration', ($_POST['timespent_duration']?$_POST['timespent_duration']:''), 0, 'text');
$durationtouse = ($_POST['timespent_duration']?$_POST['timespent_duration']:'');
if (GETPOSTISSET('timespent_durationhour') || GETPOSTISSET('timespent_durationmin'))
{
$durationtouse = (GETPOST('timespent_durationhour') * 3600 + GETPOST('timespent_durationmin') * 60);
}
print $form->select_duration('timespent_duration', $durationtouse, 0, 'text');
print '</td>';
// Progress declared