diff --git a/htdocs/actioncomm.class.php b/htdocs/actioncomm.class.php index 1e9f9094397..b6883996dba 100644 --- a/htdocs/actioncomm.class.php +++ b/htdocs/actioncomm.class.php @@ -358,9 +358,9 @@ class ActionComm } if ($mode == 3) { - if ($percent==0) return img_picto($langs->trans('StatusActionToDo'),'statut1'); - if ($percent > 0 && $percent < 100) return img_picto($langs->trans('StatusActionInProcess').' ('.$percent.'%)','statut3'); - if ($percent >= 100) return img_picto($langs->trans('StatusActionDone'),'statut6'); + if ($percent==0) return img_picto($langs->trans("Status").': '.$langs->trans('StatusActionToDo'),'statut1'); + if ($percent > 0 && $percent < 100) return img_picto($langs->trans("Status").': '.$langs->trans('StatusActionInProcess').' ('.$percent.'%)','statut3'); + if ($percent >= 100) return img_picto($langs->trans("Status").': '.$langs->trans('StatusActionDone'),'statut6'); } if ($mode == 4) { @@ -375,6 +375,32 @@ class ActionComm if ($percent >= 100) return $langs->trans('StatusActionDone').' '.img_picto($langs->trans('StatusActionDone'),'statut6'); } } + + /** + * \brief Renvoie nom clicable (avec eventuellement le picto) + * \param withpicto Inclut le picto dans le lien + * \param option Nombre de caractères max dans libellé + * \return string Chaine avec URL + * \remarks Utilise $this->id, $this->code et $this->libelle + */ + function getNomUrl($withpicto=0,$option) + { + global $langs; -} + $result=''; + $lien = ''; + $lienfin=''; + + $transcode=$langs->trans("Action".$this->code); + $libelle=($transcode!="Action".$this->code ? $transcode : $this->libelle); + $libelleshort=$libelle; + if ($option) $libelleshort=dolibarr_trunc($libelle,$option); + + if ($withpicto) $result.=($lien.img_object($langs->trans("ShowTask").': '.$libelle,'task').$lienfin.' '); + $result.=$lien.$libelleshort.$lienfin; + return $result; + } + +} + ?> diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 0d2a223bd99..8b31e564f5b 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -28,6 +28,7 @@ */ require("./pre.inc.php"); +require_once(DOL_DOCUMENT_ROOT."/client.class.php"); if ($conf->contrat->enabled) require_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php"); if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT."/propal.class.php"); require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php"); @@ -278,11 +279,13 @@ print '