瀏覽代碼

Enhance method getKanbanView

Laurent Destailleur 2 年之前
父節點
當前提交
0f475783de
共有 43 個文件被更改,包括 125 次插入144 次删除
  1. 2 1
      htdocs/adherents/class/adherent.class.php
  2. 3 2
      htdocs/adherents/class/adherent_type.class.php
  3. 2 1
      htdocs/adherents/class/subscription.class.php
  4. 3 2
      htdocs/bom/class/bom.class.php
  5. 3 2
      htdocs/comm/propal/class/propal.class.php
  6. 3 2
      htdocs/compta/bank/class/account.class.php
  7. 3 2
      htdocs/compta/bank/class/paymentvarious.class.php
  8. 3 2
      htdocs/compta/cashcontrol/class/cashcontrol.class.php
  9. 3 2
      htdocs/compta/facture/class/facture.class.php
  10. 3 2
      htdocs/compta/localtax/class/localtax.class.php
  11. 3 2
      htdocs/compta/paiement/cheque/class/remisecheque.class.php
  12. 3 2
      htdocs/compta/prelevement/class/bonprelevement.class.php
  13. 3 2
      htdocs/compta/sociales/class/chargesociales.class.php
  14. 3 2
      htdocs/compta/tva/class/tva.class.php
  15. 2 1
      htdocs/contact/class/contact.class.php
  16. 3 2
      htdocs/contrat/class/contrat.class.php
  17. 0 28
      htdocs/core/class/commonobject.class.php
  18. 0 33
      htdocs/core/class/commonobjectline.class.php
  19. 2 1
      htdocs/core/class/commonorder.class.php
  20. 3 2
      htdocs/don/class/don.class.php
  21. 3 2
      htdocs/expensereport/class/expensereport.class.php
  22. 3 2
      htdocs/expensereport/class/paymentexpensereport.class.php
  23. 3 2
      htdocs/fichinter/class/fichinter.class.php
  24. 3 2
      htdocs/fourn/class/fournisseur.commande.class.php
  25. 3 2
      htdocs/fourn/class/fournisseur.facture.class.php
  26. 6 8
      htdocs/holiday/class/holiday.class.php
  27. 10 3
      htdocs/holiday/list.php
  28. 3 2
      htdocs/hrm/class/evaluation.class.php
  29. 3 2
      htdocs/hrm/class/job.class.php
  30. 3 2
      htdocs/hrm/class/skill.class.php
  31. 3 2
      htdocs/knowledgemanagement/class/knowledgerecord.class.php
  32. 2 3
      htdocs/modulebuilder/template/class/myobject.class.php
  33. 3 2
      htdocs/mrp/class/mo.class.php
  34. 2 1
      htdocs/product/stock/class/entrepot.class.php
  35. 3 2
      htdocs/projet/class/task.class.php
  36. 3 2
      htdocs/recruitment/class/recruitmentcandidature.class.php
  37. 3 2
      htdocs/recruitment/class/recruitmentjobposition.class.php
  38. 3 2
      htdocs/salaries/class/paymentsalary.class.php
  39. 3 2
      htdocs/salaries/class/salary.class.php
  40. 3 2
      htdocs/supplier_proposal/class/supplier_proposal.class.php
  41. 3 2
      htdocs/ticket/class/ticket.class.php
  42. 2 1
      htdocs/user/class/user.class.php
  43. 2 1
      htdocs/user/class/usergroup.class.php

+ 2 - 1
htdocs/adherents/class/adherent.class.php

@@ -3208,9 +3208,10 @@ class Adherent extends CommonObject
 	 *	Return clicable link of object (with eventually picto)
 	 *
 	 *	@param      string	    $option                 Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
+	 *  @param		array		$arraydata				Array of data
 	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/adherents/class/adherent_type.class.php

@@ -933,9 +933,10 @@ class AdherentType extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs,$user;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 2 - 1
htdocs/adherents/class/subscription.class.php

@@ -510,9 +510,10 @@ class Subscription extends CommonObject
 	 *	Return clicable link of object (with eventually picto)
 	 *
 	 *	@param      string	    $option                 Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
+	 *  @param		array		$arraydata				Array of data
 	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		$return = '<div class="box-flex-item box-flex-grow-zero">';
 		$return .= '<div class="info-box info-box-sm">';

+ 3 - 2
htdocs/bom/class/bom.class.php

@@ -1523,9 +1523,10 @@ class BOM extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $db,$langs;
 		$prod = new Product($db);

+ 3 - 2
htdocs/comm/propal/class/propal.class.php

@@ -3921,9 +3921,10 @@ class Propal extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/compta/bank/class/account.class.php

@@ -1751,9 +1751,10 @@ class Account extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/compta/bank/class/paymentvarious.class.php

@@ -773,9 +773,10 @@ class PaymentVarious extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/compta/cashcontrol/class/cashcontrol.class.php

@@ -474,9 +474,10 @@ class CashControl extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/compta/facture/class/facture.class.php

@@ -5758,9 +5758,10 @@ class Facture extends CommonInvoice
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		$return = '<div class="box-flex-item box-flex-grow-zero">';
 		$return .= '<div class="info-box info-box-sm">';

+ 3 - 2
htdocs/compta/localtax/class/localtax.class.php

@@ -634,9 +634,10 @@ class Localtax extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/compta/paiement/cheque/class/remisecheque.class.php

@@ -1025,9 +1025,10 @@ class RemiseCheque extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs;
 

+ 3 - 2
htdocs/compta/prelevement/class/bonprelevement.class.php

@@ -2412,9 +2412,10 @@ class BonPrelevement extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs;
 

+ 3 - 2
htdocs/compta/sociales/class/chargesociales.class.php

@@ -754,9 +754,10 @@ class ChargeSociales extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/compta/tva/class/tva.class.php

@@ -911,9 +911,10 @@ class Tva extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 2 - 1
htdocs/contact/class/contact.class.php

@@ -2123,9 +2123,10 @@ class Contact extends CommonObject
 	 *	Return clicable link of object (with eventually picto)
 	 *
 	 *	@param      string	    $option                 Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
+	 *  @param		array		$arraydata				Array of data
 	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/contrat/class/contrat.class.php

@@ -2796,9 +2796,10 @@ class Contrat extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 0 - 28
htdocs/core/class/commonobject.class.php

@@ -770,34 +770,6 @@ abstract class CommonObject
 		}
 	}
 
-	/**
-	 *	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 = '')
-	{
-		$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() : $this->ref).'</span>';
-		if (property_exists($this, 'label')) {
-			$return .= '<br><span class="info-box-label opacitymedium">'.$this->label.'</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;
-	}
-
 	/**
 	 * 	Return full address of contact
 	 *

+ 0 - 33
htdocs/core/class/commonobjectline.class.php

@@ -166,37 +166,4 @@ abstract class CommonObjectLine extends CommonObject
 	{
 		return 0;
 	}
-
-	/**
-	 *	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(1) : '').'</span>';
-		if (property_exists($this, 'date_delivery')) {
-			$return .= '<br><span class="info-box-label opacitymedium">'.dol_print_date($this->db->jdate($this->date_delivery), "dayhour").'</span>';
-		}
-		if (property_exists($this, 'town') && !empty($this->town)) {
-			$return .= '<br><span class="info-box-label opacitymedium">'.$langs->trans("Town").'</span>';
-			$return .= '<span class="info-box-label "> : '.$this->town.'</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;
-	}
 }

+ 2 - 1
htdocs/core/class/commonorder.class.php

@@ -37,9 +37,10 @@ abstract class CommonOrder extends CommonObject
 	 *	Return clicable link of object (with eventually picto)
 	 *
 	 *	@param      string	    $option                 Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
+	 *  @param		array		$arraydata				Array of data
 	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs, $conf;
 

+ 3 - 2
htdocs/don/class/don.class.php

@@ -1146,9 +1146,10 @@ class Don extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs;
 

+ 3 - 2
htdocs/expensereport/class/expensereport.class.php

@@ -2682,9 +2682,10 @@ class ExpenseReport extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs, $selected,$arrayofselected;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/expensereport/class/paymentexpensereport.class.php

@@ -718,9 +718,10 @@ class PaymentExpenseReport extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/fichinter/class/fichinter.class.php

@@ -1461,9 +1461,10 @@ class Fichinter extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/fourn/class/fournisseur.commande.class.php

@@ -3551,9 +3551,10 @@ class CommandeFournisseur extends CommonOrder
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/fourn/class/fournisseur.facture.class.php

@@ -3237,9 +3237,10 @@ class FactureFournisseur extends CommonInvoice
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 6 - 8
htdocs/holiday/class/holiday.class.php

@@ -2423,25 +2423,23 @@ class Holiday extends CommonObject
 	 *	Return clicable link of object (with eventually picto)
 	 *
 	 *	@param      string	    $option                 Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
+	 *  @param		array		$arraydata				Label of holiday type (if known)
 	 *  @return		string		HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
-		global $langs, $selected;
+		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 .= '</span>';
 		$return .= '<div class="info-box-content">';
-		$return .= '<span class="info-box-ref">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).'</span>';
-		if (property_exists($this, 'fk_user') && !empty($this->id)) {
-			$return .= '| <span class="info-box-label">'.$this->fk_user.'</span>';
-			$return .= '<input class="fright" id="cb'.$this->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
-		}
+		$return .= '<span class="info-box-ref">'.$arraydata['user']->getNomUrl(-1).'</span>';
 		if (property_exists($this, 'fk_type')) {
 			$return .= '<br><span class="opacitymedium">'.$langs->trans("Type").'</span> : ';
-			$return .= '<span class="info_box-label">'.$langs->trans($this->getTypes(1, -1)[$this->fk_type]['code']).'</span>';
+			$return .= '<span class="info_box-label maxwidth100">'.arraydata['labeltype'].'</span>';
 		}
 		if (property_exists($this, 'date_debut') && property_exists($this, 'date_fin')) {
 			$return .= '<br><span class="info-box-label">'.dol_print_date($this->date_debut, 'day').'</span>';

+ 10 - 3
htdocs/holiday/list.php

@@ -835,15 +835,22 @@ if ($resql) {
 					print '<div class="box-flex-container">';
 				}
 
-				$holidaystatic->fk_type = $holidaystatic->getTypes(1, -1)[$obj->fk_type]['rowid'];
-				$holidaystatic->fk_user = $userstatic->getNomUrl(1);
+				$holidaystatic->fk_type = $typeleaves[$obj->fk_type]['rowid'];
+
 				// Output Kanban
 				if ($massactionbutton || $massaction) {
 					$selected = 0;
 					if (in_array($object->id, $arrayofselected)) {
 						$selected = 1;
 					}
-					print $holidaystatic->getKanbanView('');
+					if (empty($typeleaves[$obj->fk_type])) {
+						$labeltypeleavetoshow = $langs->trans("TypeWasDisabledOrRemoved", $obj->fk_type);
+					} else {
+						$labeltypeleavetoshow = ($langs->trans($typeleaves[$obj->fk_type]['code']) != $typeleaves[$obj->fk_type]['code'] ? $langs->trans($typeleaves[$obj->fk_type]['code']) : $typeleaves[$obj->fk_type]['label']);
+					}
+
+					$arraydata = array('user'=>$userstatic, 'labeltype'=>$labeltypeleavetoshow);
+					print $holidaystatic->getKanbanView('', $arraydata);
 				}
 				if ($i == (min($num, $limit) - 1)) {
 					print '</div>';

+ 3 - 2
htdocs/hrm/class/evaluation.class.php

@@ -1060,9 +1060,10 @@ class Evaluation extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $selected, $langs;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/hrm/class/job.class.php

@@ -1059,9 +1059,10 @@ class Job extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $selected, $langs;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/hrm/class/skill.class.php

@@ -1118,9 +1118,10 @@ class Skill extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $selected, $langs;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/knowledgemanagement/class/knowledgerecord.class.php

@@ -1071,9 +1071,10 @@ class KnowledgeRecord extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs, $selected,$arrayofselected;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 2 - 3
htdocs/modulebuilder/template/class/myobject.class.php

@@ -869,10 +869,10 @@ class MyObject extends CommonObject
 	 *	Return a thumb for kanban views
 	 *
 	 *	@param      string	    $option                 Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
+	 *  @param		array		$arraydata				Array of data
 	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	/*
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		$return = '<div class="box-flex-item box-flex-grow-zero">';
 		$return .= '<div class="info-box info-box-sm">';
@@ -893,7 +893,6 @@ class MyObject extends CommonObject
 
 		return $return;
 	}
-	*/
 
 	/**
 	 *  Return the label of the status

+ 3 - 2
htdocs/mrp/class/mo.class.php

@@ -1562,9 +1562,10 @@ class Mo extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 2 - 1
htdocs/product/stock/class/entrepot.class.php

@@ -921,9 +921,10 @@ class Entrepot extends CommonObject
 	 *	Return clicable link of object (with eventually picto)
 	 *
 	 *	@param      string	    $option                 Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
+	 *  @param		array		$arraydata				Array of data
 	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/projet/class/task.class.php

@@ -2330,9 +2330,10 @@ class Task extends CommonObjectLine
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs, $conf;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/recruitment/class/recruitmentcandidature.class.php

@@ -1029,9 +1029,10 @@ class RecruitmentCandidature extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs, $selected,$arrayofselected;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/recruitment/class/recruitmentjobposition.class.php

@@ -1113,9 +1113,10 @@ class RecruitmentJobPosition extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs, $selected,$arrayofselected,$obj;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/salaries/class/paymentsalary.class.php

@@ -767,9 +767,10 @@ class PaymentSalary extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs, $db;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/salaries/class/salary.class.php

@@ -712,9 +712,10 @@ class Salary extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/supplier_proposal/class/supplier_proposal.class.php

@@ -2732,9 +2732,10 @@ class SupplierProposal extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 3 - 2
htdocs/ticket/class/ticket.class.php

@@ -2937,9 +2937,10 @@ class Ticket extends CommonObject
 	 *	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.
+	 *  @param		array		$arraydata				Array of data
+	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs, $selected,$arrayofselected,$obj;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';

+ 2 - 1
htdocs/user/class/user.class.php

@@ -2996,9 +2996,10 @@ class User extends CommonObject
 	 *	Return clicable link of object (with eventually picto)
 	 *
 	 *	@param      string	    $option                 Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
+	 *  @param		array		$arraydata				Array of data
 	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		$return = '<div class="box-flex-item box-flex-grow-zero">';
 		$return .= '<div class="info-box info-box-sm">';

+ 2 - 1
htdocs/user/class/usergroup.class.php

@@ -922,9 +922,10 @@ class UserGroup extends CommonObject
 	 *	Return clicable link of object (with eventually picto)
 	 *
 	 *	@param      string	    $option                 Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
+	 *  @param		array		$arraydata				Array of data
 	 *  @return		string								HTML Code for Kanban thumb.
 	 */
-	public function getKanbanView($option = '')
+	public function getKanbanView($option = '', $arraydata = null)
 	{
 		global $langs;
 		$return = '<div class="box-flex-item box-flex-grow-zero">';