34 global $db, $langs, $conf;
36 $langs->load(
"recruitment");
41 $head[$h][0] = DOL_URL_ROOT .
'/recruitment/recruitmentjobposition_card.php?id=' .
$object->id;
42 $head[$h][1] = $langs->trans(
"PositionToBeFilled");
43 $head[$h][2] =
'card';
46 $head[$h][0] = DOL_URL_ROOT .
'/recruitment/recruitmentcandidature_list.php?id=' .
$object->id;
47 $head[$h][1] = $langs->trans(
"RecruitmentCandidatures");
48 $sql =
"SELECT COUNT(rowid) as nb FROM " . MAIN_DB_PREFIX .
"recruitment_recruitmentcandidature WHERE fk_recruitmentjobposition = " . ((int)
$object->id);
49 $resql = $db->query($sql);
51 $obj = $db->fetch_object($resql);
53 $nCandidature = $obj->nb;
54 if ($nCandidature > 0) {
55 $head[$h][1] .=
'<span class="badge marginleftonlyshort">' . $nCandidature .
'</span>';
61 $head[$h][2] =
'candidatures';
64 if (isset(
$object->fields[
'note_public']) || isset(
$object->fields[
'note_private'])) {
66 if (!empty(
$object->note_private)) {
69 if (!empty(
$object->note_public)) {
72 $head[$h][0] = DOL_URL_ROOT .
'/recruitment/recruitmentjobposition_note.php?id=' .
$object->id;
73 $head[$h][1] = $langs->trans(
'Notes');
75 $head[$h][1] .=
'<span class="badge marginleftonlyshort">' . $nbNote .
'</span>';
77 $head[$h][2] =
'note';
81 require_once DOL_DOCUMENT_ROOT .
'/core/lib/files.lib.php';
82 require_once DOL_DOCUMENT_ROOT .
'/core/class/link.class.php';
84 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
86 $head[$h][0] = DOL_URL_ROOT .
'/recruitment/recruitmentjobposition_document.php?id=' .
$object->id;
87 $head[$h][1] = $langs->trans(
'Documents');
88 if (($nbFiles + $nbLinks) > 0) {
89 $head[$h][1] .=
'<span class="badge marginleftonlyshort">' . ($nbFiles + $nbLinks) .
'</span>';
91 $head[$h][2] =
'document';
94 $head[$h][0] = DOL_URL_ROOT .
'/recruitment/recruitmentjobposition_agenda.php?id=' .
$object->id;
95 $head[$h][1] = $langs->trans(
"Events");
96 $head[$h][2] =
'agenda';
125 global $conf, $dolibarr_main_url_root;
127 $ref = str_replace(
' ',
'', $ref);
131 $urlwithouturlroot = preg_replace(
'/' . preg_quote(DOL_URL_ROOT,
'/') .
'$/i',
'', trim($dolibarr_main_url_root));
132 $urlwithroot = $urlwithouturlroot . DOL_URL_ROOT;
135 $urltouse = DOL_MAIN_URL_ROOT;
136 if ($localorexternal) {
137 $urltouse = $urlwithroot;
140 $out = $urltouse .
'/public/recruitment/view.php?ref=' . ($mode ?
'<span style="color: #666666">' :
'') . $ref . ($mode ?
'</span>' :
'');
148 if (!empty($out) && isModEnabled(
'multicompany')) {
149 $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.