diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang
index 4c089ba97b4..df0563383c0 100644
--- a/htdocs/langs/en_US/projects.lang
+++ b/htdocs/langs/en_US/projects.lang
@@ -116,7 +116,7 @@ ConfirmCloseAProject=Are you sure you want to close this project?
AlsoCloseAProject=Also close project (keep it open if you still need to follow production tasks on it)
ReOpenAProject=Open project
ConfirmReOpenAProject=Are you sure you want to re-open this project?
-ProjectContact=Project contacts
+ProjectContact=Contacts of project
TaskContact=Task contacts
ActionsOnProject=Events on project
YouAreNotContactOfProject=You are not a contact of this private project
@@ -125,7 +125,7 @@ DeleteATimeSpent=Delete time spent
ConfirmDeleteATimeSpent=Are you sure you want to delete this time spent?
DoNotShowMyTasksOnly=See also tasks not assigned to me
ShowMyTasksOnly=View only tasks assigned to me
-TaskRessourceLinks=Contacts task
+TaskRessourceLinks=Contacts of task
ProjectsDedicatedToThisThirdParty=Projects dedicated to this third party
NoTasks=No tasks for this project
LinkedToAnotherCompany=Linked to other third party
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index 4f0567c51f3..7c632f1fb63 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -44,6 +44,7 @@ $cancel = GETPOST('cancel', 'alpha');
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
$contextpage= GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'myobjectlist'; // To manage different context of search
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
+$optioncss = GETPOST('optioncss', 'alpha');
$id = GETPOST('id', 'int');
$projectid = GETPOST('projectid', 'int');
@@ -571,36 +572,46 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
print '
';
}
- // Link to create time
- //if ((empty($id) && empty($ref)) || ! empty($projectidforalltimes))
- //{
- if ($user->rights->projet->all->creer || $user->rights->projet->creer)
- {
- if ($projectstatic->public || $userWrite > 0)
- {
- if (! empty($projectidforalltimes)) // We are on tab 'Time Spent' of project
- {
- $backtourl = $_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.($withproject?'&withproject=1':'');
- $linktocreatetime = ''.$langs->trans('AddTimeSpent').'';
- }
- else // We are on tab 'Time Spent' of task
- {
- $backtourl = $_SERVER['PHP_SELF'].'?id='.$object->id.($withproject?'&withproject=1':'');
- $linktocreatetime = ''.$langs->trans('AddTimeSpent').'';
- }
- }
- else
- {
- $linktocreatetime = ''.$langs->trans('AddTime').'';
- }
- }
- else
- {
- $linktocreatetime = ''.$langs->trans('AddTime').'';
- }
- //}
+ // Link to create time
+ if ($user->rights->projet->all->creer || $user->rights->projet->creer)
+ {
+ if ($projectstatic->public || $userWrite > 0)
+ {
+ if (! empty($projectidforalltimes)) // We are on tab 'Time Spent' of project
+ {
+ $backtourl = $_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.($withproject?'&withproject=1':'');
+ $linktocreatetime = ''.$langs->trans('AddTimeSpent').'';
+ }
+ else // We are on tab 'Time Spent' of task
+ {
+ $backtourl = $_SERVER['PHP_SELF'].'?id='.$object->id.($withproject?'&withproject=1':'');
+ $linktocreatetime = ''.$langs->trans('AddTimeSpent').'';
+ }
+ }
+ else
+ {
+ $linktocreatetime = ''.$langs->trans('AddTime').'';
+ }
+ }
+ else
+ {
+ $linktocreatetime = ''.$langs->trans('AddTime').'';
+ }
}
+ $massactionbutton = '';
+ if ($projectstatic->bill_time)
+ {
+ $arrayofmassactions = array(
+ 'generateinvoice'=>$langs->trans("GenerateBill"),
+ //'builddoc'=>$langs->trans("PDFMerge"),
+ );
+ //if ($user->rights->projet->creer) $arrayofmassactions['predelete']=$langs->trans("Delete");
+ if (in_array($massaction, array('presend','predelete','generateinvoice'))) $arrayofmassactions=array();
+ $massactionbutton=$form->selectMassAction('', $arrayofmassactions);
+ }
+
+ // Show section with information of task. If id of task is not defined and project id defined, then $projectidforalltimes is not empty.
if (empty($projectidforalltimes))
{
$head=task_prepare_head($object);
@@ -645,7 +656,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
print '
| '.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").' | ';
@@ -671,7 +682,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
print ' ';
print '';
- print '
|