From 18bb535787cc0fbb2f648a18810accb30a68308b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 8 Dec 2022 11:03:35 +0100 Subject: [PATCH] Debug v17 --- htdocs/core/class/commonobject.class.php | 3 +- .../template/class/myobject.class.php | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index d00a4cfc3bc..c4e6f926a2e 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -770,7 +770,7 @@ abstract class CommonObject } /** - * Return clicable link of object (with eventually picto) + * Return a thumb for kanban views * * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) * @return string HTML Code for Kanban thumb. @@ -781,7 +781,6 @@ abstract class CommonObject $return .= '
'; $return .= ''; $return .= img_picto('', $this->picto); - //$return .= ''; // Can be image $return .= ''; $return .= '
'; $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index ef440ce56ae..2fe7d983513 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -865,6 +865,36 @@ class MyObject extends CommonObject return $result; } + /** + * Return a thumb for kanban views + * + * @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 = '') + { + $return = '
'; + $return .= '
'; + $return .= ''; + $return .= img_picto('', $this->picto); + $return .= ''; + $return .= '
'; + $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + if (property_exists($this, 'label')) { + $return .= '
'.$this->label.''; + } + if (method_exists($this, 'getLibStatut')) { + $return .= '
'.$this->getLibStatut(5).'
'; + } + $return .= '
'; + $return .= '
'; + $return .= '
'; + + return $return; + } + */ + /** * Return the label of the status *