31require
'../main.inc.php';
40require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
41require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
43require_once DOL_DOCUMENT_ROOT.
'/hrm/class/evaluation.class.php';
44require_once DOL_DOCUMENT_ROOT.
'/hrm/class/job.class.php';
45require_once DOL_DOCUMENT_ROOT.
'/hrm/class/skill.class.php';
46require_once DOL_DOCUMENT_ROOT.
'/hrm/class/skillrank.class.php';
47require_once DOL_DOCUMENT_ROOT.
'/hrm/lib/hrm_evaluation.lib.php';
48require_once DOL_DOCUMENT_ROOT.
'/hrm/lib/hrm_skillrank.lib.php';
52$langs->loadLangs(array(
'hrm',
'other',
'products'));
57$action =
GETPOST(
'action',
'aZ09');
58$confirm =
GETPOST(
'confirm',
'alpha');
60$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'evaluationcard';
61$backtopage =
GETPOST(
'backtopage',
'alpha');
62$backtopageforcancel =
GETPOST(
'backtopageforcancel',
'alpha');
68$diroutputmassaction =
$conf->hrm->dir_output.
'/temp/massgeneration/'.$user->id;
69$hookmanager->initHooks(array(
'evaluationcard',
'globalcard'));
72$extrafields->fetch_name_optionals_label(
$object->table_element);
74$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
77$search_all =
GETPOST(
"search_all",
'alpha');
79foreach (
$object->fields as $key => $val) {
80 if (
GETPOST(
'search_'.$key,
'alpha')) {
81 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
85if (empty($action) && empty($id) && empty($ref)) {
90include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
93$permissiontoread = $user->hasRight(
'hrm',
'evaluation',
'read');
94$permissiontoadd = $user->hasRight(
'hrm',
'evaluation',
'write');
95$permissiontovalidate = (
getDolGlobalString(
'MAIN_USE_ADVANCED_PERMS') && $user->hasRight(
'hrm',
'evaluation_advance',
'validate')) || (!
getDolGlobalString(
'MAIN_USE_ADVANCED_PERMS') && $permissiontoadd);
96$permissiontoclose = $user->hasRight(
'hrm',
'evaluation',
'write');
97$permissiontodelete = $user->hasRight(
'hrm',
'evaluation',
'delete');
98$permissiondellink = $user->hasRight(
'hrm',
'evaluation',
'write');
99$upload_dir =
$conf->hrm->multidir_output[isset(
$object->entity) ?
$object->entity : 1].
'/evaluation';
104$isdraft = (
$object->status == Evaluation::STATUS_DRAFT) ? 1 : 0;
109if (!$permissiontoread || ($action ===
'create' && !$permissiontoadd)) {
117$parameters = array();
118$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
120 setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
123if (empty($reshook)) {
126 $backurlforlist =
dol_buildpath(
'/hrm/evaluation_list.php', 1);
128 if (empty($backtopage) || ($cancel && empty($id))) {
129 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
130 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
131 $backtopage = $backurlforlist;
133 $backtopage =
dol_buildpath(
'/hrm/evaluation_card.php', 1).
'?id='.(
$id > 0 ?
$id :
'__ID__');
138 if ($action ==
'saveSkill' && $permissiontoadd) {
139 $TNote =
GETPOST(
'TNote',
'array');
140 if (!empty($TNote)) {
141 foreach (
$object->lines as $line) {
142 $line->rankorder = ($TNote[$line->fk_skill] ==
"NA" ? -1 : $TNote[$line->fk_skill]);
143 $result = $line->update($user);
145 setEventMessages($line->error, $line->errors,
'errors');
151 $action =
'validate';
154 if ($action ==
"validate" && $permissiontoadd) {
155 $TNote =
GETPOST(
'TNote',
'array');
157 foreach (
$object->lines as $line) {
158 if (!in_array($TNote[$line->fk_skill], array(
"0",
""))) {
164 setEventMessage($langs->trans(
"WarningEvaluationEmptyValidate"),
'errors');
169 $triggermodname =
'HRM_EVALUATION_MODIFY';
172 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
175 include DOL_DOCUMENT_ROOT.
'/core/actions_dellink.inc.php';
178 include DOL_DOCUMENT_ROOT.
'/core/actions_printing.inc.php';
184 if ($action ==
'set_thirdparty' && $permissiontoadd) {
185 $object->setValueFrom(
'fk_soc',
GETPOSTINT(
'fk_soc'),
'',
null,
'date',
'', $user, $triggermodname);
187 if ($action ==
'classin' && $permissiontoadd) {
192 $triggersendname =
'HRM_EVALUATION_SENTBYMAIL';
193 $autocopy =
'MAIN_MAIL_AUTOCOPY_EVALUATION_TO';
194 $trackid =
'evaluation'.$object->id;
195 include DOL_DOCUMENT_ROOT.
'/core/actions_sendmails.inc.php';
197 if ($action ==
'close' && $permissiontoadd) {
200 $SkillrecordsForActiveUser = $sk->fetchAll(
'ASC',
'fk_skill', 0, 0,
"(fk_object:=:".((
int)
$object->fk_user).
") AND (objecttype:=:'".$db->escape(SkillRank::SKILLRANK_TYPE_USER).
"')",
'AND');
201 '@phan-var-force SkillRank[] $SkillrecordsForActiveUser';
205 foreach (
$object->lines as $key => $line) {
207 if (count($SkillrecordsForActiveUser) == 0) {
209 $resCreate = $newSkill->cloneFromCurrentSkill($line,
$object->fk_user);
211 if ($resCreate <= 0) {
213 setEventMessage($langs->trans(
'ErrorCreateUserSkill', $line->fk_skill));
218 foreach ($SkillrecordsForActiveUser as $k => $sr) {
219 if ($sr->fk_skill == $line->fk_skill) {
226 $updSkill = $SkillrecordsForActiveUser[$keyFind];
228 $updSkill->rankorder = $line->rankorder;
229 $result = $updSkill->update($user);
231 setEventMessages($updSkill->error, $updSkill->errors,
'errors');
235 $resCreate = $newSkill->cloneFromCurrentSkill($line,
$object->fk_user);
239 if (empty($errors)) {
240 $object->setStatut(Evaluation::STATUS_CLOSED);
241 setEventMessage(
'EmployeeSkillsUpdated');
245 if ($action ==
'reopen' && $permissiontoadd) {
247 $object->setStatut(Evaluation::STATUS_VALIDATED);
251 include DOL_DOCUMENT_ROOT.
'/core/actions_builddoc.inc.php';
254 if ($action ==
'remove_file_comfirm' && $permissiontoadd) {
256 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
258 $upload_dir =
$conf->hrm->dir_output;
259 $file = $upload_dir.
'/'.
GETPOST(
'file');
262 setEventMessages($langs->trans(
"FileWasRemoved",
GETPOST(
'urlfile')),
null,
'mesgs');
264 setEventMessages($langs->trans(
"ErrorFailToDeleteFile",
GETPOST(
'urlfile')),
null,
'errors');
274$form =
new Form($db);
277$title = $langs->trans(
"Evaluation");
280$css[] =
'/hrm/css/style.css';
281llxHeader(
'', $title, $help_url,
'', 0, 0,
'', $css);
284 $(document).ready(
function() {
285 $(
"#btn_valid").click(
function() {
286 console.log(
"Click on btn_valid");
287 var form = $(
"#form_save_rank");
296if ($action ==
'create') {
299 print
'<form method="POST" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
300 print
'<input type="hidden" name="token" value="'.newToken().
'">';
301 print
'<input type="hidden" name="action" value="add">';
303 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
305 if ($backtopageforcancel) {
306 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
311 print
'<table class="border centpercent tableforfieldcreate">'.
"\n";
314 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_add.tpl.php';
317 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
319 print
'</table>'.
"\n";
323 print $form->buttonsSaveCancel(
"Create",
"Cancel");
329if (($id || $ref) && $action ==
'edit') {
330 print
load_fiche_titre($langs->trans(
"Evaluation"),
'',
'object_'.$object->picto);
332 print
'<form method="POST" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
333 print
'<input type="hidden" name="token" value="'.newToken().
'">';
334 print
'<input type="hidden" name="action" value="update">';
335 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
337 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
339 if ($backtopageforcancel) {
340 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
345 print
'<table class="border centpercent tableforfieldedit">'.
"\n";
348 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_edit.tpl.php';
351 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
357 print $form->buttonsSaveCancel();
363if (
$object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
364 $res =
$object->fetch_optionals();
367 print
dol_get_fiche_head($head,
'card', $langs->trans(
"Workstation"), -1,
$object->picto, 0,
'',
'', 0,
'', 1);
371 if ($action ==
'validate' && $permissiontovalidate) {
376 $ref = substr(
$object->ref, 1, 4);
377 if ($ref ==
'PROV') {
378 $numref =
$object->getNextNumRef();
379 if (empty($numref)) {
384 $numref = (string)
$object->ref;
387 $text = $langs->trans(
'ConfirmValidateEvaluation', $numref);
389 require_once DOL_DOCUMENT_ROOT.
'/core/class/notify.class.php';
390 $notify =
new Notify($db);
392 $text .= $notify->confirmMessage(
'HRM_EVALUATION_VALIDATE', 0, $object);
396 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'ValidateEvaluation'), $text,
'confirm_validate',
'', 0, 1);
401 if ($action ==
'delete') {
402 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'DeleteEvaluation'), $langs->trans(
'ConfirmDeleteObject'),
'confirm_delete',
'', 0, 1);
405 if ($action ==
'deleteline') {
406 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&lineid='.$lineid, $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_deleteline',
'', 0, 1);
409 if ($action ==
'clone') {
411 $formquestion = array();
412 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk',
$object->ref),
'confirm_clone', $formquestion,
'yes', 1);
416 $parameters = array(
'formConfirm' => $formconfirm,
'lineid' => $lineid);
417 $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action);
418 if (empty($reshook)) {
419 $formconfirm .= $hookmanager->resPrint;
420 } elseif ($reshook > 0) {
421 $formconfirm = $hookmanager->resPrint;
430 $linkback =
'<a href="'.dol_buildpath(
'/hrm/evaluation_list.php', 1).
'?restore_lastsearch_values=1'.(!empty($socid) ?
'&socid='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
432 $morehtmlref =
'<div class="refidno">';
433 $morehtmlref .= $langs->trans(
'Label').
' : '.
$object->label;
434 $u_position =
new User(($db));
435 $u_position->fetch(
$object->fk_user);
436 $morehtmlref .=
'<br>'.$u_position->getNomUrl(1);
439 $morehtmlref .=
'<br>'.$langs->trans(
'JobProfile').
' : '.$job->getNomUrl(1);
440 $morehtmlref .=
'</div>';
444 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
447 print
'<div class="fichecenter">';
448 print
'<div class="fichehalfleft">';
449 print
'<div class="underbanner clearboth"></div>';
450 print
'<table class="border centpercent tableforfield">'.
"\n";
452 $object->fields[
'label'][
'visible'] = 0;
453 $object->fields[
'fk_user'][
'visible'] = 0;
454 $object->fields[
'fk_job'][
'visible'] = 0;
455 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_view.tpl.php';
458 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
464 print
'<div class="clearboth"></div>';
471 if (!empty(
$object->table_element_line) &&
$object->status == Evaluation::STATUS_DRAFT) {
473 $result =
$object->getLinesArray();
480 print
' <form name="form_save_rank" id="form_save_rank" action="'.$_SERVER[
"PHP_SELF"].
'?id='.
$object->id.(($action !=
'editline') ?
'' :
'#line_'.
GETPOSTINT(
'lineid')).
'" method="POST">
481 <input type="hidden" name="token" value="' .
newToken().
'">
482 <input type="hidden" name="action" value="saveSkill">
483 <input type="hidden" name="mode" value="">
484 <input type="hidden" name="page_y" value="">
485 <input type="hidden" name="id" value="' .
$object->id.
'">
488 if (!empty(
$conf->use_javascript_ajax) &&
$object->status == 0) {
489 include DOL_DOCUMENT_ROOT.
'/core/tpl/ajaxrow.tpl.php';
492 $conf->modules_parts[
'tpl'][
'hrm'] =
'/hrm/core/tpl/';
494 print
'<div class="div-table-responsive-no-min">';
495 if (!empty(
$object->lines) || (
$object->status == $object::STATUS_DRAFT && $permissiontoadd && $action !=
'selectlines' && $action !=
'editline')) {
496 print
'<table id="tablelines" class="noborder noshadow centpercent">';
504 print
'<tr><td colspan="4"><span class="opacitymedium">'.img_warning().
' '.$langs->trans(
"TheJobProfileHasNoSkillsDefinedFixBefore").
'</td></tr>';
522 if (!empty(
$object->lines) || (
$object->status == $object::STATUS_DRAFT && $permissiontoadd && $action !=
'selectlines' && $action !=
'editline')) {
534 if (
$object->status != Evaluation::STATUS_DRAFT) {
539 $sql .=
' e.date_creation,';
540 $sql .=
' e.fk_job,';
541 $sql .=
' j.label as "refjob",';
542 $sql .=
' ed.fk_skill,';
544 $sql .=
' sk.label as "skilllabel",';
545 $sql .=
' sk.skill_type,';
546 $sql .=
' sk.description,';
547 $sql .=
' ed.rankorder,';
548 $sql .=
' ed.required_rank,';
549 $sql .=
' ed.rankorder as "userRankForSkill",';
550 $sql .=
' skdet_user.description as "userRankForSkillDesc",';
551 $sql .=
' skdet_required.description as "required_rank_desc"';
553 $sql .=
' FROM ' . MAIN_DB_PREFIX .
'hrm_evaluation as e';
554 $sql .=
' LEFT JOIN ' . MAIN_DB_PREFIX .
'hrm_evaluationdet as ed ON e.rowid = ed.fk_evaluation';
555 $sql .=
' LEFT JOIN ' . MAIN_DB_PREFIX .
'hrm_job as j ON e.fk_job = j.rowid';
556 $sql .=
' LEFT JOIN ' . MAIN_DB_PREFIX .
'hrm_skill as sk ON ed.fk_skill = sk.rowid';
557 $sql .=
' INNER JOIN ' . MAIN_DB_PREFIX .
'hrm_skilldet as skdet_user ON (skdet_user.fk_skill = sk.rowid AND skdet_user.rankorder = ed.rankorder)';
559 $sql .=
' LEFT JOIN ' . MAIN_DB_PREFIX .
'hrm_skilldet as skdet_required ON (skdet_required.fk_skill = sk.rowid AND skdet_required.rankorder = ed.required_rank)';
560 $sql .=
" WHERE e.rowid =" . ((int)
$object->id);
564 $resql = $db->query($sql);
569 while ($obj = $db->fetch_object($resql)) {
572 $Tab[$num]->skill_type = $obj->skill_type;
573 $Tab[$num]->skill_id = $obj->fk_skill;
574 $Tab[$num]->skilllabel = $obj->skilllabel;
575 $Tab[$num]->description = $obj->description;
576 $Tab[$num]->userRankForSkill =
'<span title="'.$obj->userRankForSkillDesc.
'" class="radio_js_bloc_number TNote_1">' . $obj->userRankForSkill .
'</span>';
578 $required_rank = $obj->required_rank;
579 $required_rank_desc = $obj->required_rank_desc;
580 if ($required_rank ==
"-1") {
581 $required_rank = $langs->trans(
"NA");
582 $required_rank_desc = $langs->trans(
"NA");
583 } elseif ($required_rank ==
"0") {
584 $required_rank_desc = $langs->trans(
'SkillNotRequired');
587 $Tab[$num]->required_rank =
'<span title="'.$required_rank_desc.
'" class="radio_js_bloc_number TNote_1">' . $required_rank .
'</span>';
589 if ($obj->userRankForSkill < 0 || $obj->required_rank < 0) {
590 $title = $langs->trans(
'NA');
592 } elseif ($obj->userRankForSkill > $obj->required_rank) {
593 $title = $langs->trans(
'MaxlevelGreaterThanShort');
594 $class .=
'veryhappy';
595 } elseif ($obj->userRankForSkill == $obj->required_rank) {
596 $title = $langs->trans(
'MaxLevelEqualToShort');
598 } elseif ($obj->userRankForSkill < $obj->required_rank) {
599 $title = $langs->trans(
'MaxLevelLowerThanShort');
603 $Tab[$num]->result =
'<span title="'.$title.
'" class="classfortooltip ' . $class .
' note"> </span>';
610 print
'<div class="div-table-responsive-no-min">';
611 print
'<table id="tablelines" class="noborder noshadow centpercent">';
613 print
'<tr class="liste_titre">';
614 print
'<th style="width:auto;text-align:auto" class="liste_titre">' . $langs->trans(
"TypeSkill") .
' </th>';
615 print
'<th style="width:auto;text-align:auto" class="liste_titre">' . $langs->trans(
"Label") .
'</th>';
616 print
'<th style="width:auto;text-align:auto" class="liste_titre">' . $langs->trans(
"Description") .
'</th>';
617 print
'<th style="width:auto;text-align:center" class="liste_titre">' . $langs->trans(
"EmployeeRank") .
'</th>';
618 print
'<th style="width:auto;text-align:center" class="liste_titre">' . $langs->trans(
"RequiredRank") .
'</th>';
619 print
'<th style="width:auto;text-align:auto" class="liste_titre">' . $langs->trans(
"Result") .
' ' .$form->textwithpicto(
'',
GetLegendSkills(), 1) .
'</th>';
622 $sk =
new Skill($db);
623 foreach ($Tab as $t) {
624 $sk->fetch($t->skill_id);
628 print
' <td class="tdoverflowmax200">' . $sk->getNomUrl(1) .
'</td>';
629 print
' <td class="tdoverflowmax200" title="'.dolPrintHTMLForAttribute($t->description).
'">' . dolPrintHTML($t->description) .
'</td>';
630 print
' <td class="center">' . $t->userRankForSkill .
'</td>';
631 print
' <td class="center">' . $t->required_rank .
'</td>';
632 print
' <td>' . $t->result .
'</td>';
641 $(document).ready(
function() {
642 $(
".radio_js_bloc_number").tooltip();
652 if ($action !=
'presend' && $action !=
'editline') {
653 print
'<div class="tabsAction">'.
"\n";
654 $parameters = array();
655 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
657 setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
660 if (empty($reshook)) {
662 if (empty($user->socid)) {
663 print dolGetButtonAction(
'', $langs->trans(
'SendMail'),
'email', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=presend&mode=init&token='.
newToken().
'#formmailbeforetitle');
667 if (
$object->status == $object::STATUS_VALIDATED) {
668 print dolGetButtonAction(
'', $langs->trans(
'SetToDraft'),
'default', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=confirm_setdraft&confirm=yes&token='.
newToken(),
'', $permissiontoadd);
669 print dolGetButtonAction(
'', $langs->trans(
'Close'),
'close', $_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=close&token='.
newToken(),
'', $permissiontodelete || (
$object->status == $object::STATUS_CLOSED && $permissiontoclose));
670 } elseif (
$object->status != $object::STATUS_CLOSED) {
671 print dolGetButtonAction(
'', $langs->trans(
'Modify'),
'default', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=edit&token='.
newToken(),
'', $permissiontoadd);
674 if (
$object->status == $object::STATUS_CLOSED) {
675 print dolGetButtonAction($langs->trans(
'ReOpen'),
'',
'default', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=reopen&token='.
newToken(),
'', $permissiontoadd);
680 if (
$object->status == $object::STATUS_DRAFT) {
682 print dolGetButtonAction($langs->trans(
'Save').
' '.$langs->trans(
'and').
' '.$langs->trans(
'Valid'),
'',
'default',
'#',
'btn_valid', $permissiontovalidate);
684 $langs->load(
"errors");
685 print dolGetButtonAction($langs->trans(
"ErrorAddAtLeastOneLineFirst"), $langs->trans(
"Validate"),
'default',
'#',
'', 0);
691 print dolGetButtonAction($langs->trans(
'Delete'), $langs->trans(
'Delete'),
'delete', $_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=delete&token='.
newToken(),
'', $permissiontodelete, array(
'attr' => array(
'class' =>
'reposition'))).
"\n";
699 if (
GETPOST(
'modelselected')) {
703 if ($action !=
'presend') {
704 print
'<div class="fichecenter"><div class="fichehalfleft">';
705 print
'<a name="builddoc"></a>';
707 $includedocgeneration = 1;
710 if ($user->hasRight(
'hrm',
'evaluation',
'read')) {
712 $relativepath = $objref.
'/'.$objref.
'.pdf';
713 $filedir =
$conf->hrm->dir_output.
'/'.
$object->element.
'/'.$objref;
714 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".
$object->id;
715 $genallowed = $user->hasRight(
'hrm',
'evaluation',
'read');
716 $delallowed = $user->hasRight(
'hrm',
'evaluation',
'write');
717 print $formfile->showdocuments(
'hrm:Evaluation',
$object->element.
'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed,
$object->model_pdf, 1, 0, 0, 28, 0,
'',
'',
'', $langs->defaultlang,
'', $object, 0,
'remove_file_comfirm');
721 $tmparray = $form->showLinkToObjectBlock($object, array(), array(
'evaluation'), 1);
722 $linktoelem = $tmparray[
'linktoelem'];
723 $htmltoenteralink = $tmparray[
'htmltoenteralink'];
724 print $htmltoenteralink;
726 $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
729 print
'</div><div class="fichehalfright">';
733 $morehtmlcenter =
dolGetButtonTitle($langs->trans(
'SeeAll'),
'',
'fa fa-bars imgforviewmode', DOL_URL_ROOT.
'/hrm/evaluation_agenda.php?id='.
$object->id);
736 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formactions.class.php';
738 $somethingshown = $formactions->showactions($object,
$object->element.
'@'.
$object->module, (is_object(
$object->thirdparty) ?
$object->thirdparty->id : 0), 1,
'', $MAXEVENT,
'', $morehtmlcenter);
740 print
'</div></div>';
749 $modelmail =
'evaluation';
750 $defaulttopic =
'InformationMessage';
751 $diroutput =
$conf->hrm->dir_output;
752 $trackid =
'evaluation'.$object->id;
754 include DOL_DOCUMENT_ROOT.
'/core/tpl/card_presend.tpl.php';
$id
Support class for third parties, contacts, members, users or resources.
if(! $sortfield) if(! $sortorder) $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 the table of subscription to notifications.
static typeCodeToLabel($code)
Class to manage Dolibarr users.
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_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0, $allowdash=0)
Clean a string to use it as a file name.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
evaluationPrepareHead($object)
Prepare array of tabs for Evaluation.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $nodie=0, $mode='')
Check permissions of a user to show a page and an object.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.