29require
"../../main.inc.php";
30require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
31require_once DOL_DOCUMENT_ROOT.
'/projet/class/task.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/class/extrafields.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/modules/project/task/modules_task.php';
38require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
49$langs->loadlangs(array(
'projects',
'companies'));
51$action =
GETPOST(
'action',
'aZ09');
52$confirm =
GETPOST(
'confirm',
'alpha');
60$ref =
GETPOST(
"ref",
'alpha', 1);
61$taskref =
GETPOST(
"taskref",
'alpha');
63$project_ref =
GETPOST(
'project_ref',
'alpha');
64$planned_workload = ((
GETPOST(
'planned_workloadhour') !=
'' ||
GETPOST(
'planned_workloadmin') !=
'') ? (
GETPOSTINT(
'planned_workloadhour') > 0 ?
GETPOSTINT(
'planned_workloadhour') * 3600 : 0) + (
GETPOSTINT(
'planned_workloadmin') > 0 ?
GETPOSTINT(
'planned_workloadmin') * 60 : 0) :
'');
65$mode =
GETPOST(
'mode',
'alpha');
68$hookmanager->initHooks(array(
'projecttaskcard',
'globalcard'));
72$projectstatic =
new Project($db);
75$extrafields->fetch_name_optionals_label(
$object->table_element);
77$parameters = array(
'id' => $id);
78$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
84 $ret =
$object->fetch($id, $ref);
86 $projectstatic->fetch(
$object->fk_project);
102if ($action ==
'update' && !
GETPOST(
"cancel") && $user->hasRight(
'projet',
'creer')) {
103 if (empty($taskref)) {
105 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Ref")),
null,
'errors');
109 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Label")),
null,
'errors');
114 $tmparray = explode(
'_',
GETPOST(
'task_parent'));
115 $task_parent = $tmparray[1];
116 if (empty($task_parent)) {
127 $object->fk_task_parent = $task_parent;
128 $object->planned_workload = $planned_workload;
136 $ret = $extrafields->setOptionalsFromPost(
null, $object,
'@GETPOSTISSET');
142 $result =
$object->update($user);
155if ($action ==
'confirm_merge' && $confirm ==
'yes' && $user->hasRight(
'projet',
'creer')) {
157 $task_origin =
new Task($db);
159 if ($task_origin_id <= 0) {
160 $langs->load(
'errors');
161 setEventMessages($langs->trans(
'ErrorTaskIdIsMandatory', $langs->transnoentitiesnoconv(
'MergeOriginTask')),
null,
'errors');
163 if (!$error && $task_origin->fetch($task_origin_id) < 1) {
168 $result =
$object->mergeTask($task_origin_id);
179if ($action ==
'confirm_clone' && $confirm ==
'yes') {
181 $clone_prog =
GETPOST(
'clone_prog') ? 1 : 0;
182 $clone_time =
GETPOST(
'clone_time') ? 1 : 0;
183 $clone_affectation =
GETPOST(
'clone_affectation') ? 1 : 0;
184 $clone_change_dt =
GETPOST(
'clone_change_dt') ? 1 : 0;
185 $clone_notes =
GETPOST(
'clone_notes') ? 1 : 0;
186 $clone_file =
GETPOST(
'clone_file') ? 1 : 0;
187 $result =
$object->createFromClone($user,
$object->id,
$object->fk_project,
$object->fk_task_parent, $clone_change_dt, $clone_affectation, $clone_time, $clone_file, $clone_notes, $clone_prog);
192 $newobject =
new Task($db);
193 $newobject->fetch($result);
194 $newobject->fetch_optionals();
195 $newobject->fetch_thirdparty();
201if ($action ==
'confirm_delete' && $confirm ==
"yes" && $user->hasRight(
'projet',
'supprimer')) {
202 $result = $projectstatic->fetch(
$object->fk_project);
203 $projectstatic->fetch_thirdparty();
205 if (
$object->delete($user) > 0) {
206 header(
'Location: '.DOL_URL_ROOT.
'/projet/tasks.php?restore_lastsearch_values=1&id='.$projectstatic->id.($withproject ?
'&withproject=1' :
''));
215if (!empty($project_ref) && !empty($withproject)) {
216 if ($projectstatic->fetch(0, $project_ref) > 0) {
217 $tasksarray =
$object->getTasksArray(
null,
null, $projectstatic->id, $socid, 0);
218 if (count($tasksarray) > 0) {
219 $id = $tasksarray[0]->id;
221 header(
"Location: ".DOL_URL_ROOT.
'/projet/tasks.php?id='.$projectstatic->id.(empty($mode) ?
'' :
'&mode='.$mode));
227if ($action ==
'builddoc' && $user->hasRight(
'projet',
'creer')) {
233 $outputlangs = $langs;
234 if (
GETPOST(
'lang_id',
'aZ09')) {
236 $outputlangs->setDefaultLang(
GETPOST(
'lang_id',
'aZ09'));
238 $result =
$object->generateDocument(
$object->model_pdf, $outputlangs);
246if ($action ==
'remove_file' && $user->hasRight(
'projet',
'creer')) {
247 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
249 $langs->load(
"other");
266$form =
new Form($db);
272if (!empty($withproject)) {
273 $title .=
' | ' . $langs->trans(
"Project") . (!empty($projectstatic->ref) ?
': '.$projectstatic->ref :
'') ;
277llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-project project-tasks page-task');
280if ($id > 0 || !empty($ref)) {
281 $res =
$object->fetch_optionals();
282 if (
getDolGlobalString(
'PROJECT_ALLOW_COMMENT_ON_TASK') && method_exists($object,
'fetchComments') && empty(
$object->comments)) {
287 if (
getDolGlobalString(
'PROJECT_ALLOW_COMMENT_ON_PROJECT') && method_exists($projectstatic,
'fetchComments') && empty($projectstatic->comments)) {
288 $projectstatic->fetchComments();
290 if (!empty($projectstatic->socid)) {
291 $projectstatic->fetch_thirdparty();
294 $object->project = clone $projectstatic;
298 if (!empty($withproject)) {
302 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($projectstatic->public ?
'projectpub' :
'project'), 0,
'',
'');
304 $param = ($mode ==
'mine' ?
'&mode=mine' :
'');
308 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
310 $morehtmlref =
'<div class="refidno">';
312 $morehtmlref .= $projectstatic->title;
314 if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
315 $morehtmlref .=
'<br>'.$projectstatic->thirdparty->getNomUrl(1,
'project');
317 $morehtmlref .=
'</div>';
320 if (!$user->hasRight(
'projet',
'all',
'lire')) {
321 $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
322 $projectstatic->next_prev_filter =
"rowid:IN:".$db->sanitize(count($objectsListId) ? implode(
',', array_keys($objectsListId)) :
'0');
325 dol_banner_tab($projectstatic,
'project_ref', $linkback, 1,
'ref',
'ref', $morehtmlref, $param);
327 print
'<div class="fichecenter">';
328 print
'<div class="fichehalfleft">';
329 print
'<div class="underbanner clearboth"></div>';
331 print
'<table class="border tableforfield centpercent">';
335 print
'<tr><td class="tdtop">';
336 print $langs->trans(
"Usage");
340 print
'<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET(
'usage_opportunity') ? (
GETPOST(
'usage_opportunity',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_opportunity ?
' checked="checked"' :
'')).
'"> ';
341 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
342 print $form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
346 print
'<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET(
'usage_task') ? (
GETPOST(
'usage_task',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_task ?
' checked="checked"' :
'')).
'"> ';
347 $htmltext = $langs->trans(
"ProjectFollowTasks");
348 print $form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
352 print
'<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET(
'usage_bill_time') ? (
GETPOST(
'usage_bill_time',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_bill_time ?
' checked="checked"' :
'')).
'"> ';
353 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
354 print $form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
357 if (isModEnabled(
'eventorganization')) {
358 print
'<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET(
'usage_organize_event') ? (
GETPOST(
'usage_organize_event',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_organize_event ?
' checked="checked"' :
'')).
'"> ';
359 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
360 print $form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
366 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
367 if (isset($projectstatic->budget_amount) && strcmp($projectstatic->budget_amount,
'')) {
368 print
'<span class="amount">'.price($projectstatic->budget_amount, 0, $langs, 1, 0, 0,
$conf->currency).
'</span>';
373 print
'<tr><td>'.$langs->trans(
"Dates").
'</td><td>';
375 print($start ? $start :
'?');
378 print($end ? $end :
'?');
379 if ($projectstatic->hasDelay()) {
385 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
386 if ($projectstatic->public) {
387 print
img_picto($langs->trans(
'SharedProject'),
'world',
'class="paddingrightonly"');
388 print $langs->trans(
'SharedProject');
390 print
img_picto($langs->trans(
'PrivateProject'),
'private',
'class="paddingrightonly"');
391 print $langs->trans(
'PrivateProject');
399 include DOL_DOCUMENT_ROOT .
'/core/tpl/extrafields_view.tpl.php';
406 print
'<div class="fichehalfright">';
407 print
'<div class="underbanner clearboth"></div>';
409 print
'<table class="border tableforfield centpercent">';
412 if (isModEnabled(
'category')) {
413 print
'<tr><td class="valignmiddle">'.$langs->trans(
"Categories").
'</td><td>';
414 print $form->showCategories($projectstatic->id,
'project', 1);
419 print
'<tr><td class="titlefield'.($projectstatic->description ?
' noborderbottom' :
'').
'" colspan="2">'.$langs->trans(
"Description").
'</td></tr>';
420 if ($projectstatic->description) {
421 print
'<tr><td class="nottitleforfield" colspan="2">';
422 print
'<div class="longmessagecut">';
433 print
'<div class="clearboth"></div>';
471 if ($action ==
'edit' && $user->hasRight(
'projet',
'creer')) {
472 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
473 print
'<input type="hidden" name="token" value="'.newToken().
'">';
474 print
'<input type="hidden" name="action" value="update">';
475 print
'<input type="hidden" name="withproject" value="'.$withproject.
'">';
476 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
478 print
dol_get_fiche_head($head,
'task_task', $langs->trans(
"Task"), 0,
'projecttask', 0,
'',
'');
480 print
'<table class="border centpercent">';
483 print
'<tr><td class="titlefield fieldrequired">'.$langs->trans(
"Ref").
'</td>';
484 print
'<td><input class="minwidth100" name="taskref" value="'.$object->ref.
'"></td></tr>';
487 print
'<tr><td class="fieldrequired">'.$langs->trans(
"Label").
'</td>';
488 print
'<td><input class="minwidth500" name="label" value="'.$object->label.
'"></td></tr>';
491 if (empty($withproject)) {
492 print
'<tr><td>'.$langs->trans(
"Project").
'</td><td>';
493 print $projectstatic->getNomUrl(1);
497 print
'<td>'.$langs->trans(
"ThirdParty").
'</td><td>';
498 if ($projectstatic->thirdparty->id) {
499 print $projectstatic->thirdparty->getNomUrl(1);
507 print
'<tr><td>'.$langs->trans(
"ChildOfProjectTask").
'</td><td>';
509 $formother->selectProjectTasks(
$object->fk_task_parent, $projectstatic->id,
'task_parent', ($user->admin ? 0 : 1), 0, 0, 0,
$object->id,
'',
'minwidth100 widthcentpercentminusxx maxwidth500');
513 print
'<tr><td>'.$langs->trans(
"DateStart").
'</td><td>';
514 print $form->selectDate(
$object->date_start,
'date_start', 1, 1, 0,
'', 1, 0);
518 print
'<tr><td>'.$langs->trans(
"Deadline").
'</td><td>';
519 print $form->selectDate(
$object->date_end ?
$object->date_end : -1,
'date_end', 1, 1, 0,
'', 1, 0);
523 print
'<tr><td>'.$langs->trans(
"PlannedWorkload").
'</td><td>';
524 print $form->select_duration(
'planned_workload',
$object->planned_workload, 0,
'text');
528 print
'<tr><td>'.$langs->trans(
"ProgressDeclared").
'</td><td>';
529 print $formother->select_percent(
$object->progress,
'progress', 0, 5, 0, 100, 1);
533 print
'<tr><td>'.$langs->trans(
"Billable").
'</td><td>';
534 print $form->selectyesno(
'billable',
$object->billable);
539 print
'<tr><td class="tdtop">'.$langs->trans(
"Description").
'</td>';
543 include_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
545 $doleditor =
new DolEditor(
'description',
$object->description,
'', 80,
'dolibarr_details',
'',
false,
true,
getDolGlobalInt(
'FCKEDITOR_ENABLE_SOCIETE'), $nbrows,
'90%');
546 print $doleditor->Create();
551 print
'<tr><td>'.$langs->trans(
"Budget").
'</td>';
552 print
'<td><input class="width75" type="text" name="budget_amount" value="'.dol_escape_htmltag(GETPOSTISSET(
'budget_amount') ?
GETPOST(
'budget_amount') :
price2num(
$object->budget_amount)).
'"></td>';
556 $parameters = array();
557 $reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters, $object, $action);
558 print $hookmanager->resPrint;
559 if (empty($reshook)) {
560 print
$object->showOptionals($extrafields,
'edit');
567 print $form->buttonsSaveCancel(
"Modify");
574 $param = ($withproject ?
'&withproject=1' :
'');
575 $linkback = $withproject ?
'<a href="'.DOL_URL_ROOT.
'/projet/tasks.php?id='.$projectstatic->id.
'&restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>' :
'';
577 print
dol_get_fiche_head($head,
'task_task', $langs->trans(
"Task"), -1,
'projecttask', 0,
'',
'reposition');
579 if ($action ==
'clone') {
580 $formquestion = array(
581 'text' => $langs->trans(
"ConfirmClone"),
583 0 => array(
'type' =>
'checkbox',
'name' =>
'clone_change_dt',
'label' => $langs->trans(
"CloneChanges"),
'value' =>
true),
584 1 => array(
'type' =>
'checkbox',
'name' =>
'clone_affectation',
'label' => $langs->trans(
"CloneAffectation"),
'value' =>
true),
585 2 => array(
'type' =>
'checkbox',
'name' =>
'clone_prog',
'label' => $langs->trans(
"CloneProgression"),
'value' =>
true),
586 3 => array(
'type' =>
'checkbox',
'name' =>
'clone_time',
'label' => $langs->trans(
"CloneTimes"),
'value' =>
true),
587 4 => array(
'type' =>
'checkbox',
'name' =>
'clone_file',
'label' => $langs->trans(
"CloneFile"),
'value' =>
true),
590 print $form->formconfirm($_SERVER[
"PHP_SELF"].
"?id=".
$object->id, $langs->trans(
"ToClone"), $langs->trans(
"ConfirmCloneTask"),
"confirm_clone", $formquestion,
'', 1, 300, 590);
593 if ($action ==
'merge') {
594 $formquestion = array(
596 'name' =>
'task_origin',
597 'label' => $langs->trans(
'MergeOriginTask'),
599 'value' => $formproject->selectTasks(-1,
'',
'task_origin', 24, 0, $langs->trans(
'SelectTask'), 0, 0, 0,
'maxwidth500 minwidth200',
'',
'',
null, 1)
602 print $form->formconfirm($_SERVER[
"PHP_SELF"].
"?id=".
$object->id.(GETPOST(
'withproject') ?
"&withproject=1" :
""), $langs->trans(
"MergeTasks"), $langs->trans(
"ConfirmMergeTasks"),
"confirm_merge", $formquestion,
'yes', 1, 250);
605 if ($action ==
'delete') {
606 print $form->formconfirm($_SERVER[
"PHP_SELF"].
"?id=".
GETPOSTINT(
"id").
'&withproject='.$withproject, $langs->trans(
"DeleteATask"), $langs->trans(
"ConfirmDeleteATask"),
"confirm_delete");
609 if (!
GETPOST(
'withproject') || empty($projectstatic->id)) {
610 $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
611 $object->next_prev_filter =
"fk_projet:IN:".$db->sanitize($projectsListId);
613 $object->next_prev_filter =
"fk_projet:=:".((int) $projectstatic->id);
619 if (empty($withproject)) {
620 $morehtmlref .=
'<div class="refidno">';
621 $morehtmlref .= $langs->trans(
"Project").
': ';
622 $morehtmlref .= $projectstatic->getNomUrl(1);
623 $morehtmlref .=
'<br>';
626 $morehtmlref .= $langs->trans(
"ThirdParty").
': ';
627 if (!empty($projectstatic->thirdparty) && is_object($projectstatic->thirdparty)) {
628 $morehtmlref .= $projectstatic->thirdparty->getNomUrl(1);
630 $morehtmlref .=
'</div>';
633 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref, $param);
635 print
'<div class="fichecenter">';
636 print
'<div class="fichehalfleft">';
638 print
'<div class="underbanner clearboth"></div>';
639 print
'<table class="border centpercent tableforfield">';
642 print
'<tr><td>'.$langs->trans(
"ChildOfTask").
'</td><td>';
643 if (
$object->fk_task_parent > 0) {
644 $tasktmp =
new Task($db);
645 $tasktmp->fetch(
$object->fk_task_parent);
646 print $tasktmp->getNomUrl(1);
651 print
'<tr><td class="titlefield">'.$langs->trans(
"DateStart").
' - '.$langs->trans(
"Deadline").
'</td><td colspan="3">';
653 print($start ? $start :
'?');
656 print($end ? $end :
'?');
663 print
'<tr><td>'.$langs->trans(
"PlannedWorkload").
'</td><td colspan="3">';
664 if (
$object->planned_workload !=
'') {
670 print
'<td class="tdtop">'.$langs->trans(
"Description").
'</td><td colspan="3">';
677 print
'<div class="fichehalfright">';
679 print
'<div class="underbanner clearboth"></div>';
680 print
'<table class="border centpercent tableforfield">';
683 print
'<tr><td class="titlefield">'.$langs->trans(
"ProgressDeclared").
'</td><td colspan="3">';
690 print
'<tr><td>'.$langs->trans(
"ProgressCalculated").
'</td><td colspan="3">';
691 if (
$object->planned_workload !=
'') {
692 $tmparray =
$object->getSummaryOfTimeSpent();
693 if ($tmparray[
'total_duration'] > 0 && !empty(
$object->planned_workload)) {
694 print round($tmparray[
'total_duration'] /
$object->planned_workload * 100, 2).
' %';
699 print
'<span class="opacitymedium">'.$langs->trans(
"WorkloadNotDefined").
'</span>';
704 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
705 if (!is_null(
$object->budget_amount) && strcmp((
string)
$object->budget_amount,
'')) {
706 print
'<span class="amount">'.price(
$object->budget_amount, 0, $langs, 1, 0, 0,
$conf->currency).
'</span>';
711 print
'<tr><td>'.$langs->trans(
"Billable").
'</td><td>';
712 print
'<span>'.($object->billable ? $langs->trans(
'Yes') : $langs->trans(
'No')).
'</span>';
717 $parameters = array(
'socid' => $socid);
718 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
725 print
'<div class="clearboth"></div>';
731 if ($action !=
'edit') {
736 print
'<div class="tabsAction">';
738 $parameters = array();
739 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
741 if (empty($reshook)) {
743 if ($user->hasRight(
'projet',
'creer')) {
744 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=edit&token='.
newToken().
'&withproject='.((int) $withproject).
'">'.$langs->trans(
'Modify').
'</a>';
745 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=clone&token='.
newToken().
'&withproject='.((int) $withproject).
'">'.$langs->trans(
'Clone').
'</a>';
746 print
'<a class="butActionDelete classfortooltip" href="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=merge&token='.
newToken().
'&withproject='.((int) $withproject).
'" title="'.$langs->trans(
"MergeTasks").
'">'.$langs->trans(
'Merge').
'</a>';
748 print
'<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
"NotAllowed").
'">'.$langs->trans(
'Modify').
'</a>';
752 $permissiontodelete = $user->hasRight(
'projet',
'supprimer');
753 if ($permissiontodelete) {
755 print
dolGetButtonAction($langs->trans(
"Delete"),
'',
'delete', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=delete&token='.
newToken().
'&withproject='.((
int) $withproject),
'delete', $permissiontodelete);
757 print
dolGetButtonAction($langs->trans(
"TaskHasChild"), $langs->trans(
"Delete"),
'delete', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=delete&token='.
newToken().
'&withproject='.((
int) $withproject),
'delete', 0);
760 print
dolGetButtonAction($langs->trans(
"Delete"),
'',
'delete', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=delete&token='.
newToken().
'&withproject='.((
int) $withproject),
'delete', $permissiontodelete);
766 print
'<div class="fichecenter"><div class="fichehalfleft">';
767 print
'<a name="builddoc"></a>';
774 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".
$object->id;
775 $genallowed = ($user->hasRight(
'projet',
'lire'));
776 $delallowed = ($user->hasRight(
'projet',
'creer'));
778 print $formfile->showdocuments(
'project_task', $filename, $filedir, $urlsource, $genallowed, $delallowed,
$object->model_pdf);
781 $tmparray = $form->showLinkToObjectBlock($object, array(), array(
'project_task'), 1);
782 $linktoelem = $tmparray[
'linktoelem'];
783 $htmltoenteralink = $tmparray[
'htmltoenteralink'];
784 print $htmltoenteralink;
786 $compatibleImportElementsList =
false;
787 $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem, $compatibleImportElementsList);
789 print
'</div><div class="fichehalfright">';
792 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formactions.class.php';
794 $formactions->showactions($object,
'project_task', 0, 1,
'', 10,
'withproject='.$withproject);
796 print
'</div></div>';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Class to manage a WYSIWYG editor.
Class to manage projects.
Class to manage translations.
convertSecondToTime($iSecond, $format='all', $lengthOfDay=86400, $lengthOfWeek=7)
Return, in clear text, value of a number of seconds in days, hours and minutes.
dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $object=null, $allowdotdot=false, $indexdatabase=1, $nolog=0)
Remove a file or several files with a mask.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dolPrintHTML($s, $allowiframe=0)
Return a string (that can be on several lines) ready to be output on a HTML page.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dolGetButtonAction($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
GETPOSTFLOAT($paramname, $rounding='')
Return the value of a $_GET or $_POST supervariable, converted into float.
dol_htmlentitiesbr($stringtoencode, $nl2brmode=0, $pagecodefrom='UTF-8', $removelasteolbr=1)
This function is called to encode a string into a HTML string but differs from htmlentities because a...
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0)
Clean a string to use it as a file name.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
task_prepare_head($object)
Prepare array with list of tabs.
project_prepare_head(Project $project, $moreparam='')
Prepare array with list of tabs.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.