diff --git a/htdocs/langs/en_US/recruitment.lang b/htdocs/langs/en_US/recruitment.lang index 6b0e8117254..888f6fe5225 100644 --- a/htdocs/langs/en_US/recruitment.lang +++ b/htdocs/langs/en_US/recruitment.lang @@ -74,3 +74,5 @@ JobClosedTextCanceled=The job position is closed. ExtrafieldsJobPosition=Complementary attributes (job positions) ExtrafieldsApplication=Complementary attributes (job applications) MakeOffer=Make an offer +WeAreRecruiting=We are recruiting. This is a list of open positions to be filled... +NoPositionOpen=No positions open at the moment diff --git a/htdocs/public/recruitment/index.php b/htdocs/public/recruitment/index.php index 1736deef246..286b5af55ba 100644 --- a/htdocs/public/recruitment/index.php +++ b/htdocs/public/recruitment/index.php @@ -47,10 +47,19 @@ $langs->loadLangs(array("companies", "other", "recruitment")); // Get parameters $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); -$email = GETPOST('email', 'alpha'); $backtopage = ''; -$ref = GETPOST('ref', 'alpha'); +// Load variable for pagination +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { + $page = 0; +} // If $page is not defined, or '' or -1 or if we click on clear filters +$offset = $limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; if (GETPOST('btn_view')) { unset($_SESSION['email_customer']); @@ -61,15 +70,6 @@ if (isset($_SESSION['email_customer'])) { $object = new RecruitmentJobPosition($db); -if (!$action) { - if (!$ref) { - print $langs->trans('ErrorBadParameters')." - ref missing"; - exit; - } else { - $object->fetch('', $ref); - } -} - // Define $urlwithroot //$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root)); //$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file @@ -111,7 +111,7 @@ $arrayofjs = array(); $arrayofcss = array(); $replacemainarea = (empty($conf->dol_hide_leftmenu) ? '
'.$text.' |
'.$langs->trans("JobOfferToBeFilled", $mysoc->name); + $text .= ' - '.$mysoc->name.''; + $text .= ' - '.dol_print_date($object->date_creation).''; + $text .= ' |
'.$object->label.' |
| ';
+
+ print ' ';
+ print ' '."\n";
+ print "\n";
+
+
+ if ($action != 'dosubmit') {
+ if ($found && !$error) { // We are in a management option and no error
+ } else {
+ dol_print_error_email('ERRORNEWONLINESIGN');
+ }
+ } else {
+ // Print
+ }
+
+ print ''.$langs->trans("ThisIsInformationOnJobPosition").' : '."\n";
+
+ $error = 0;
+ $found = true;
+
+ print ''; + + // Label + print $langs->trans("Label").' : '; + print ''.dol_escape_htmltag($object->label).' '; + + // Date + print $langs->trans("DateExpected").' : '; + print ''; + if ($object->date_planned > $now) { + print dol_print_date($object->date_planned, 'day'); + } else { + print $langs->trans("ASAP"); + } + print ' '; + + // Remuneration + print $langs->trans("Remuneration").' : '; + print ''; + print dol_escape_htmltag($object->remuneration_suggested); + print ' '; + + // Contact + $tmpuser = new User($db); + $tmpuser->fetch($object->fk_user_recruiter); + + print $langs->trans("ContactForRecruitment").' : '; + $emailforcontact = $object->email_recruiter; + if (empty($emailforcontact)) { + $emailforcontact = $tmpuser->email; + if (empty($emailforcontact)) { + $emailforcontact = $mysoc->email; + } + } + print ''; + print $tmpuser->getFullName(-1); + print ' '.dol_print_email($emailforcontact, 0, 0, 1, 0, 0, 'envelope'); + print ''; + print ' '; + + if ($object->status == RecruitmentJobPosition::STATUS_RECRUITED) { + print info_admin($langs->trans("JobClosedTextCandidateFound"), 0, 0, 0, 'warning'); + } + if ($object->status == RecruitmentJobPosition::STATUS_CANCELED) { + print info_admin($langs->trans("JobClosedTextCanceled"), 0, 0, 0, 'warning'); + } + + print ' '; + + // Description + + $text = $object->description; + print $text; + print ''; + + print ' |