Add method getKanbanView()
This commit is contained in:
parent
ed778bd28f
commit
dc3a15945d
@ -3568,7 +3568,7 @@ class Commande extends CommonOrder
|
||||
* @param int $short ???
|
||||
* @param int $notooltip 1=Disable tooltip
|
||||
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||
* @param int $addlinktonotes Add linkt to notes
|
||||
* @param int $addlinktonotes Add link to notes
|
||||
* @return string String with URL
|
||||
*/
|
||||
public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $notooltip = 0, $save_lastsearch_value = -1, $addlinktonotes = 0)
|
||||
|
||||
@ -491,6 +491,7 @@ abstract class CommonObject
|
||||
return $this->error.(is_array($this->errors) ? (($this->error != '' ? ', ' : '').join(', ', $this->errors)) : '');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return customer ref for screen output.
|
||||
*
|
||||
@ -559,6 +560,27 @@ abstract class CommonObject
|
||||
return dol_trunc($ret, $maxlen);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return clicable link of object (with eventually picto)
|
||||
*
|
||||
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
|
||||
*/
|
||||
public function getKanbanView($option = '')
|
||||
{
|
||||
$return = '<div class="box-flex-item">';
|
||||
$return .= '<div class="info-box info-box-sm">';
|
||||
$return .= '<span class="info-box-icon bg-infoxbox-action">';
|
||||
$return .= '<i class="fa fa-dol-action"></i>'; // Can be image
|
||||
$return .= '</span>';
|
||||
$return .= '<div class="info-box-content">';
|
||||
$return .= '<span class="info-box-title">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).'</span>';
|
||||
$return .= '</div>';
|
||||
$return .= '</div>';
|
||||
$return .= '</div>';
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return full address of contact
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user