kanban mode for list of proposal commande

This commit is contained in:
Lamrani Abdel 2023-01-10 11:14:14 +01:00
parent aea48e87de
commit 86ad9118f3
2 changed files with 611 additions and 552 deletions

View File

@ -3890,6 +3890,41 @@ class Propal extends CommonObject
return CommonObject::commonReplaceProduct($db, $origin_id, $dest_id, $tables);
}
/**
* 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;
$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 .= '<i class="fa fa-dol-action"></i>'; // Can be image
$return .= '</span>';
$return .= '<div class="info-box-content">';
$return .= '<span class="info-box-ref">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).'</span>';
if (property_exists($this, 'fk_project')) {
$return .= '<span class="info-box-ref"> | '.$this->fk_project.'</span>';
}
if (property_exists($this, 'author')) {
$return .= '<br><span class="info-box-label">'.$this->author.'</span>';
}
if (property_exists($this, 'total_ht')) {
$return .='<br><span class="" >'.$langs->trans("AmountHT").' : </span><span class="info-box-label amount">'.price($this->total_ht).'</span>';
}
if (method_exists($this, 'getLibStatut')) {
$return .= '<br><div class="info-box-status margintoponly">'.$this->getLibStatut(5).'</div>';
}
$return .= '</div>';
$return .= '</div>';
$return .= '</div>';
return $return;
}
}
/**

File diff suppressed because it is too large Load Diff