diff --git a/htdocs/recruitment/class/recruitmentjobposition.class.php b/htdocs/recruitment/class/recruitmentjobposition.class.php index fb34e33376e..1ee8d8e51fd 100644 --- a/htdocs/recruitment/class/recruitmentjobposition.class.php +++ b/htdocs/recruitment/class/recruitmentjobposition.class.php @@ -1107,4 +1107,43 @@ class RecruitmentJobPosition 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,$obj; + $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, 'date_planned')) { + $return .= '
'.$langs->trans("Date").' : '.dol_print_date($this->db->jdate($this->date_planned), 'day').''; + } + if (property_exists($this, 'qty')) { + $return .= '
'.$langs->trans("NbOfEmployeesExpected", '', '', '', '', 2).' : '.$this->qty.''; + } + if (property_exists($this, 'remuneration_suggested')) { + $return .= ' | '.$langs->trans("Remuneration").' : '.$this->remuneration_suggested.''; + } + if (method_exists($this, 'getLibStatut')) { + $return .= '
'.$this->getLibStatut(5).' | '.$langs->trans("RecruitmentCandidatures", '', '', '', '', 5).' : '.$obj->nbapplications.'
'; + } + $return .= '
'; + $return .= '
'; + $return .= '
'; + return $return; + } } diff --git a/htdocs/recruitment/recruitmentjobposition_list.php b/htdocs/recruitment/recruitmentjobposition_list.php index e6b538b5167..670eca08040 100644 --- a/htdocs/recruitment/recruitmentjobposition_list.php +++ b/htdocs/recruitment/recruitmentjobposition_list.php @@ -585,14 +585,21 @@ while ($i < $imaxinloop) { // Store properties in $object $object->setVarsFromFetchObj($obj); + $object->date_planned = $obj->date_planned; + if ($mode == 'kanban') { if ($i == 0) { print ''; print '
'; } - // 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 '';