33 global $db, $langs, $conf;
35 $langs->load(
"recruitment");
40 $head[$h][0] = DOL_URL_ROOT .
'/recruitment/recruitmentjobposition_card.php?id=' .
$object->id;
41 $head[$h][1] = $langs->trans(
"PositionToBeFilled");
42 $head[$h][2] =
'card';
45 $head[$h][0] = DOL_URL_ROOT .
'/recruitment/recruitmentcandidature_list.php?id=' .
$object->id;
46 $head[$h][1] = $langs->trans(
"RecruitmentCandidatures");
47 $sql =
"SELECT COUNT(rowid) as nb FROM " . MAIN_DB_PREFIX .
"recruitment_recruitmentcandidature WHERE fk_recruitmentjobposition = " . ((int)
$object->id);
48 $resql = $db->query($sql);
50 $obj = $db->fetch_object($resql);
52 $nCandidature = $obj->nb;
53 if ($nCandidature > 0) {
54 $head[$h][1] .=
'<span class="badge marginleftonlyshort">' . $nCandidature .
'</span>';
60 $head[$h][2] =
'candidatures';
63 if (isset(
$object->fields[
'note_public']) || isset(
$object->fields[
'note_private'])) {
65 if (!empty(
$object->note_private)) {
68 if (!empty(
$object->note_public)) {
71 $head[$h][0] = DOL_URL_ROOT .
'/recruitment/recruitmentjobposition_note.php?id=' .
$object->id;
72 $head[$h][1] = $langs->trans(
'Notes');
74 $head[$h][1] .=
'<span class="badge marginleftonlyshort">' . $nbNote .
'</span>';
76 $head[$h][2] =
'note';
80 require_once DOL_DOCUMENT_ROOT .
'/core/lib/files.lib.php';
81 require_once DOL_DOCUMENT_ROOT .
'/core/class/link.class.php';
83 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
85 $head[$h][0] = DOL_URL_ROOT .
'/recruitment/recruitmentjobposition_document.php?id=' .
$object->id;
86 $head[$h][1] = $langs->trans(
'Documents');
87 if (($nbFiles + $nbLinks) > 0) {
88 $head[$h][1] .=
'<span class="badge marginleftonlyshort">' . ($nbFiles + $nbLinks) .
'</span>';
90 $head[$h][2] =
'document';
93 $head[$h][0] = DOL_URL_ROOT .
'/recruitment/recruitmentjobposition_agenda.php?id=' .
$object->id;
94 $head[$h][1] = $langs->trans(
"Events");
95 $head[$h][2] =
'agenda';
124 global $conf, $dolibarr_main_url_root;
126 $ref = str_replace(
' ',
'', $ref);
130 $urlwithouturlroot = preg_replace(
'/' . preg_quote(DOL_URL_ROOT,
'/') .
'$/i',
'', trim($dolibarr_main_url_root));
131 $urlwithroot = $urlwithouturlroot . DOL_URL_ROOT;
134 $urltouse = DOL_MAIN_URL_ROOT;
135 if ($localorexternal) {
136 $urltouse = $urlwithroot;
139 $out = $urltouse .
'/public/recruitment/view.php?ref=' . ($mode ?
'<span style="color: #666666">' :
'') . $ref . ($mode ?
'</span>' :
'');
147 if (!empty($out) && isModEnabled(
'multicompany')) {
148 $out .=
"&entity=" . $conf->entity;
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
static count($dbs, $objecttype, $objectid)
Return nb of links.
dol_dir_list($utf8_path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).
getPublicJobPositionUrl($mode, $ref='', $localorexternal=0)
Return string with full Url.
recruitmentjobpositionPrepareHead($object)
Prepare array of tabs for RecruitmentJobPosition.