diff --git a/htdocs/actioncomm.class.php b/htdocs/actioncomm.class.php index 9fe48176e7b..74f6cae1585 100644 --- a/htdocs/actioncomm.class.php +++ b/htdocs/actioncomm.class.php @@ -379,11 +379,11 @@ class ActionComm /** * \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é + * \param maxlength 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) + function getNomUrl($withpicto=0,$maxlength) { global $langs; @@ -394,12 +394,12 @@ class ActionComm if ($langs->trans("Action".$this->code) != "Action".$this->code) { $libelle=$langs->trans("Action".$this->code); - $libelleshort=$langs->trans("Action".$this->code,'','','','',$option); + $libelleshort=$langs->trans("Action".$this->code,'','','','',$maxlength); } else { $libelle=$this->libelle; - $libelleshort=dolibarr_trunc($this->libelle,$option); + $libelleshort=dolibarr_trunc($this->libelle,$maxlength); } if ($withpicto) $result.=($lien.img_object($langs->trans("ShowTask").': '.$libelle,'task').$lienfin.' '); diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index c49dcd7c8a4..229fec784c8 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -80,7 +80,7 @@ if ($_GET["time"] == "today") } if ($socid) { - $sql .= " AND s.idp = $socid"; + $sql .= " AND s.idp = ".$socid; } if (!$user->rights->commercial->client->voir && !$socid) //restriction { @@ -95,6 +95,7 @@ $resql=$db->query($sql); if ($resql) { $actionstatic=new ActionComm($db); + $societestatic=new Societe($db); $num = $db->num_rows($resql); $title="DoneAndToDoActions"; @@ -116,7 +117,6 @@ if ($resql) $i = 0; print "
| '; + print ' | '; if ($oldyear == strftime("%Y",$obj->dp) ) { } @@ -168,11 +168,12 @@ if ($resql) // print ' | '.dolibarr_print_date($obj->dp)." | \n"; // Action (type) - print ''.img_object($langs->trans("ShowTask"),"task").' '; - $transcode=$langs->trans("Action".$obj->acode); - $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle); - print dolibarr_trunc($libelle,16); - print ' | '; + print ''; + $actionstatic->id=$obj->id; + $actionstatic->code=$obj->acode; + $actionstatic->libelle=$obj->libelle; + print $actionstatic->getNomUrl(1,12); + print ' | '; // Titre print ''; @@ -181,10 +182,11 @@ if ($resql) // Société print ' | '; - if ($obj->client == 1) $url=DOL_URL_ROOT.'/comm/fiche.php?socid='; - elseif ($obj->client == 2) $url=DOL_URL_ROOT.'/comm/prospect/fiche.php?id='; - else $url=DOL_URL_ROOT.'/soc.php?socid='; - print ' '.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($obj->societe,24).' | '; + $societestatic->rowid=$obj->socid; + $societestatic->client=$obj->client; + $societestatic->nom=$obj->societe; + print $societestatic->getNomUrl(1,'',16); + print ''; // Contact print ''; diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 2e1d6a0e2c9..164197cd261 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -182,6 +182,7 @@ llxHeader('',$langs->trans('CustomerCard')); $actionstatic=new ActionComm($db); $facturestatic=new Facture($db); $contactstatic = new Contact($db); +$userstatic=new User($db); if ($socid > 0) { @@ -844,7 +845,11 @@ if ($socid > 0) print ' | '; } - print ' | '.img_object($langs->trans("ShowUser"),"user").' '.$obj->login.' | '; + print ''; + $userstatic->id=$obj->fk_user_author; + $userstatic->login=$obj->login; + print $userstatic->getLoginUrl(1); + print ' | '; // Statut print ''.$actionstatic->LibStatut($obj->percent,3).' | '; @@ -977,7 +982,11 @@ if ($socid > 0) } // Auteur - print ''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.' | '; + print ''; + $userstatic->id=$obj->rowid; + $userstatic->login=$obj->login; + print $userstatic->getLoginUrl(1); + print ' | '; // Statut print ''.$actionstatic->LibStatut($obj->percent,3).' | '; diff --git a/htdocs/contact.class.php b/htdocs/contact.class.php index d85b92fb7e6..946d4605acc 100644 --- a/htdocs/contact.class.php +++ b/htdocs/contact.class.php @@ -671,7 +671,7 @@ class Contact $lienfin=''; } - if ($withpicto) $result.=($lien.img_object($langs->trans("ShowContact"),'contact').$lienfin.' '); + if ($withpicto) $result.=($lien.img_object($langs->trans("ShowContact").': '.$this->name.' '.$this->firstname,'contact').$lienfin.' '); $result.=$lien.$this->name.' '.$this->firstname.$lienfin; return $result; } diff --git a/htdocs/societe.class.php b/htdocs/societe.class.php index 22c3832d610..bd4f69eb155 100644 --- a/htdocs/societe.class.php +++ b/htdocs/societe.class.php @@ -1126,7 +1126,7 @@ class Societe $lienfin=''; } - if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCompany"),'company').$lienfin.' '); + if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCompany").': '.$this->nom,'company').$lienfin.' '); $result.=$lien.($maxlen?dolibarr_trunc($this->nom,$maxlen):$this->nom).$lienfin; return $result; }