diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 62fda9fa597..6830a398e22 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -561,12 +561,12 @@ class ActionComm extends CommonObject /** * Renvoie nom clicable (avec eventuellement le picto) + * Utilise $this->id, $this->code et $this->libelle * @param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul * @param maxlength Nombre de caracteres max dans libelle * @param class Force style class on a link * @param option ''=Link to action,'birthday'=Link to contact * @return string Chaine avec URL - * @remarks Utilise $this->id, $this->code et $this->libelle */ function getNomUrl($withpicto=0,$maxlength=0,$classname='',$option='',$overwritepicto='') { @@ -576,8 +576,8 @@ class ActionComm extends CommonObject if ($option=='birthday') $lien = ''; else $lien = ''; $lienfin=''; - - if ($langs->trans("Action".$this->type_code) != "Action".$this->type_code || ! $this->libelle) + //print $this->libelle; + if (empty($this->libelle)) { $libelle=$langs->trans("Action".$this->type_code); $libelleshort=$langs->trans("Action".$this->type_code,'','','','',$maxlength); @@ -588,7 +588,11 @@ class ActionComm extends CommonObject $libelleshort=dol_trunc($this->libelle,$maxlength); } - if ($withpicto) $result.=($lien.img_object($langs->trans("ShowAction").': '.$libelle,($overwritepicto?$overwritepicto:'task')).$lienfin); + if ($withpicto) + { + $libelle.=(($this->type_code && $libelle!=$langs->trans("Action".$this->type_code) && $langs->trans("Action".$this->type_code)!="Action".$this->type_code)?' ('.$langs->trans("Action".$this->type_code).')':''); + $result.=$lien.img_object($langs->trans("ShowAction").': '.$libelle,($overwritepicto?$overwritepicto:'task')).$lienfin; + } if ($withpicto==1) $result.=' '; $result.=$lien.$libelleshort.$lienfin; return $result; diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index 3cc9c05d748..e231a7a89ee 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -218,7 +218,7 @@ if ($resql) // Action (type) print ''; $actionstatic->id=$obj->id; - $actionstatic->code=$obj->acode; + $actionstatic->type_code=$obj->acode; $actionstatic->libelle=$obj->label; print $actionstatic->getNomUrl(1,12); print '';