From 04903460b186f8db7ef26e149f3235b45f124738 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 2 Aug 2020 18:09:53 +0200 Subject: [PATCH] Add contact on job page --- htdocs/core/lib/functions.lib.php | 2 +- htdocs/langs/en_US/recruitment.lang | 3 ++- htdocs/public/recruitment/view.php | 17 +++++++++++++++-- .../class/recruitmentjobposition.class.php | 2 +- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 0db2a6e48d3..57d05d263f4 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3012,7 +3012,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ '1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected', 'accountancy', 'address', 'bank_account', 'barcode', 'bank', 'bill', 'bookmark', 'bom', 'building', 'cash-register', 'category', 'check', 'clock', 'close_title', 'company', 'contact', 'contract', 'cubes', - 'delete', 'dolly', 'dollyrevert', 'edit', 'ellipsis-h', 'external-link-alt', 'external-link-square-alt', + 'delete', 'dolly', 'dollyrevert', 'edit', 'ellipsis-h', 'email', 'external-link-alt', 'external-link-square-alt', 'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'help', 'intervention', 'label', 'language', 'list', 'listlight', 'lot', 'map-marker-alt', 'money-bill-alt', 'mrp', 'note', diff --git a/htdocs/langs/en_US/recruitment.lang b/htdocs/langs/en_US/recruitment.lang index 4e20a42fbb5..ad58f1d33be 100644 --- a/htdocs/langs/en_US/recruitment.lang +++ b/htdocs/langs/en_US/recruitment.lang @@ -51,4 +51,5 @@ ListOfPositionsToBeFilled=List of job offers to be filled NewPositionToBeFilled=New job offers to be filled JobOfferToBeFilled=Job offer to be filled -ThisIsInformationOnJobPosition=Information of the job position to be filled \ No newline at end of file +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment \ No newline at end of file diff --git a/htdocs/public/recruitment/view.php b/htdocs/public/recruitment/view.php index e34908dd0a7..88e6a36f582 100644 --- a/htdocs/public/recruitment/view.php +++ b/htdocs/public/recruitment/view.php @@ -250,12 +250,10 @@ $found = true; print '
'; // Label - print $langs->trans("Label").' : '; print ''.$object->label.'
'; // Date - print $langs->trans("DateExpected").' : '; print ''; if ($object->date_planned > $now) { @@ -265,6 +263,21 @@ if ($object->date_planned > $now) { } print '
'; +// Contact +print $langs->trans("ContactForRecruitment").' : '; +$tmpuser = new User($db); +$tmpuser->fetch($object->fk_user_recruiter); +print ''; +print $tmpuser->getFullName(-1); +$emailforcontact = $tmpuser->email; +if (empty($emailforcontact)) { + $emailforcontact = $mysoc->email; +} +print ' - '.img_picto('', 'email', 'class="paddingrightonly"').dol_print_email($emailforcontact); +print ''; +print '
'; + + print '
'; // Description diff --git a/htdocs/recruitment/class/recruitmentjobposition.class.php b/htdocs/recruitment/class/recruitmentjobposition.class.php index 6d38f47211c..4029833afd0 100644 --- a/htdocs/recruitment/class/recruitmentjobposition.class.php +++ b/htdocs/recruitment/class/recruitmentjobposition.class.php @@ -99,7 +99,7 @@ class RecruitmentJobPosition extends CommonObject 'label' => array('type'=>'varchar(255)', 'label'=>'JobLabel', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth500', 'showoncombobox'=>'1', 'autofocusoncreate'=>1), 'qty' => array('type'=>'integer', 'label'=>'NbOfEmployeesExpected', 'enabled'=>'1', 'position'=>45, 'notnull'=>1, 'visible'=>1, 'default'=>'1', 'isameasure'=>'1', 'css'=>'maxwidth75imp',), 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'1', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1,), - 'fk_user_recruiter' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'ResponsibleOfRecruitement', 'enabled'=>'1', 'position'=>54, 'notnull'=>0, 'visible'=>-1, 'foreignkey'=>'user.rowid',), + 'fk_user_recruiter' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'ResponsibleOfRecruitement', 'enabled'=>'1', 'position'=>54, 'notnull'=>1, 'visible'=>-1, 'foreignkey'=>'user.rowid',), 'fk_user_supervisor' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'FutureManager', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>-1, 'foreignkey'=>'user.rowid',), 'fk_establishment' => array('type'=>'integer:Establishment:hrm/class/establishment.class.php', 'label'=>'Establishment', 'enabled'=>'$conf->hrm->enabled', 'position'=>56, 'notnull'=>0, 'visible'=>-1, 'foreignkey'=>'establishment.rowid',), 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'WorkPlace', 'enabled'=>'1', 'position'=>57, 'notnull'=>-1, 'visible'=>-1, 'index'=>1, 'help'=>"IfJobIsLocatedAtAPartner",),