32 global $db, $langs, $conf;
34 $langs->load(
"recruitment");
39 $head[$h][0] =
dol_buildpath(
"/recruitment/recruitmentcandidature_card.php", 1).
'?id='.$object->id;
40 $head[$h][1] = $langs->trans(
"RecruitmentCandidature");
41 $head[$h][2] =
'card';
44 if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
45 $head[$h][0] =
dol_buildpath(
"/recruitment/recruitmentrating_card.php", 1).
'?id='.$object->id;
46 $head[$h][1] = $langs->trans(
"Rating");
47 $head[$h][2] =
'rating';
51 if (isset($object->fields[
'note_public']) || isset($object->fields[
'note_private'])) {
53 if (!empty($object->note_private)) {
56 if (!empty($object->note_public)) {
59 $head[$h][0] =
dol_buildpath(
'/recruitment/recruitmentcandidature_note.php', 1).
'?id='.$object->id;
60 $head[$h][1] = $langs->trans(
'Notes');
62 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>';
64 $head[$h][2] =
'note';
68 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
69 require_once DOL_DOCUMENT_ROOT.
'/core/class/link.class.php';
70 $upload_dir = $conf->recruitment->dir_output.
"/recruitmentcandidature/".
dol_sanitizeFileName($object->ref);
71 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
72 $nbLinks =
Link::count($db, $object->element, $object->id);
73 $head[$h][0] =
dol_buildpath(
"/recruitment/recruitmentcandidature_document.php", 1).
'?id='.$object->id;
74 $head[$h][1] = $langs->trans(
'Documents');
75 if (($nbFiles + $nbLinks) > 0) {
76 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).
'</span>';
78 $head[$h][2] =
'document';
81 $head[$h][0] =
dol_buildpath(
"/recruitment/recruitmentcandidature_agenda.php", 1).
'?id='.$object->id;
82 $head[$h][1] = $langs->trans(
"Events");
83 $head[$h][2] =
'agenda';