diff --git a/htdocs/recruitment/class/recruitmentcandidature.class.php b/htdocs/recruitment/class/recruitmentcandidature.class.php index 1690f13da56..a1e49560adb 100644 --- a/htdocs/recruitment/class/recruitmentcandidature.class.php +++ b/htdocs/recruitment/class/recruitmentcandidature.class.php @@ -1024,6 +1024,41 @@ class RecruitmentCandidature extends CommonObject return $error; } + + /** + * Return clicable link of object (with eventually picto) + * + * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) + * @return string HTML Code for Kanban thumb. + */ + public function getKanbanView($option = '') + { + global $langs, $selected,$arrayofselected; + $return = '
'; + $return .= '
'; + $return .= ''; + $return .= img_picto('', $this->picto); + $return .= ''; + $return .= '
'; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).''; + if (in_array($this->id, $arrayofselected)) { + $selected = 1; + } + $return .= ''; + if (property_exists($this, 'fk_recruitmentjobposition')) { + $return .= '
'.$langs->trans('Job').' : '.$this->fk_recruitmentjobposition.''; + } + if (property_exists($this, 'phone')) { + $return .= '
'.$langs->trans("phone").' : '.$this->phone.''; + } + if (method_exists($this, 'getLibStatut')) { + $return .= '
'.$this->getLibStatut(5).'
'; + } + $return .= '
'; + $return .= '
'; + $return .= '
'; + return $return; + } } diff --git a/htdocs/recruitment/recruitmentcandidature_list.php b/htdocs/recruitment/recruitmentcandidature_list.php index 9b860ac54d5..8b62a5a202f 100644 --- a/htdocs/recruitment/recruitmentcandidature_list.php +++ b/htdocs/recruitment/recruitmentcandidature_list.php @@ -735,8 +735,18 @@ while ($i < $imaxinloop) { print ''; print '
'; } + $recuitment = new RecruitmentJobPosition($db); + $recuitment->fetch($obj->fk_recruitmentjobposition); + $object->fk_recruitmentjobposition = $recuitment->getNomUrl(); + $object->phone = $obj->phone; // Output Kanban - print $object->getKanbanView(''); + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + if ($massactionbutton || $massaction) { + $selected = 0; + } + // Output Kanban + print $object->getKanbanView(''); + } if ($i == ($imaxinloop - 1)) { print '
'; print '';