Merge pull request #23599 from lamrani002/kanbanForRecruitment
NEW kanban mode for list of recruitment job
This commit is contained in:
commit
84df8c4d9b
@ -1107,4 +1107,43 @@ class RecruitmentJobPosition extends CommonObject
|
|||||||
|
|
||||||
return $error;
|
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 = '<div class="box-flex-item box-flex-grow-zero">';
|
||||||
|
$return .= '<div class="info-box info-box-sm">';
|
||||||
|
$return .= '<span class="info-box-icon bg-infobox-action">';
|
||||||
|
$return .= img_picto('', $this->picto);
|
||||||
|
$return .= '</span>';
|
||||||
|
$return .= '<div class="info-box-content">';
|
||||||
|
$return .= '<span class="info-box-ref">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).'</span>';
|
||||||
|
if (in_array($this->id, $arrayofselected)) {
|
||||||
|
$selected = 1;
|
||||||
|
}
|
||||||
|
$return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||||
|
if (property_exists($this, 'date_planned')) {
|
||||||
|
$return .= '<br><span class="opacitymedium">'.$langs->trans("Date").'</span> : <span class="info-box-label">'.dol_print_date($this->db->jdate($this->date_planned), 'day').'</span>';
|
||||||
|
}
|
||||||
|
if (property_exists($this, 'qty')) {
|
||||||
|
$return .= '<br><span class="opacitymedium" title="'.$langs->trans("NbOfEmployeesExpected").'">'.$langs->trans("NbOfEmployeesExpected", '', '', '', '', 2).'</span> : <span class="info-box-label">'.$this->qty.'</span>';
|
||||||
|
}
|
||||||
|
if (property_exists($this, 'remuneration_suggested')) {
|
||||||
|
$return .= ' | <span class="opacitymedium">'.$langs->trans("Remuneration").'</span> : <span class="info-box-label">'.$this->remuneration_suggested.'</span>';
|
||||||
|
}
|
||||||
|
if (method_exists($this, 'getLibStatut')) {
|
||||||
|
$return .= '<br><div class="info-box-status margintoponly">'.$this->getLibStatut(5).' | <span class="opacitymedium" title="'.$langs->trans("RecruitmentCandidatures").'">'.$langs->trans("RecruitmentCandidatures", '', '', '', '', 5).'</span> : <span>'.$obj->nbapplications.'</span></div>';
|
||||||
|
}
|
||||||
|
$return .= '</div>';
|
||||||
|
$return .= '</div>';
|
||||||
|
$return .= '</div>';
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -585,14 +585,21 @@ while ($i < $imaxinloop) {
|
|||||||
|
|
||||||
// Store properties in $object
|
// Store properties in $object
|
||||||
$object->setVarsFromFetchObj($obj);
|
$object->setVarsFromFetchObj($obj);
|
||||||
|
$object->date_planned = $obj->date_planned;
|
||||||
|
|
||||||
|
|
||||||
if ($mode == 'kanban') {
|
if ($mode == 'kanban') {
|
||||||
if ($i == 0) {
|
if ($i == 0) {
|
||||||
print '<tr><td colspan="'.$savnbfield.'">';
|
print '<tr><td colspan="'.$savnbfield.'">';
|
||||||
print '<div class="box-flex-container">';
|
print '<div class="box-flex-container">';
|
||||||
}
|
}
|
||||||
// Output Kanban
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print $object->getKanbanView('');
|
if ($massactionbutton || $massaction) {
|
||||||
|
$selected = 0;
|
||||||
|
}
|
||||||
|
// Output Kanban
|
||||||
|
print $object->getKanbanView('');
|
||||||
|
}
|
||||||
if ($i == ($imaxinloop - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user