PERF Links in getNomUrl use only one tag a instead of 2.

This commit is contained in:
Laurent Destailleur 2017-11-02 15:03:09 +01:00
parent 1f33c251fa
commit 1b28c45e2c
18 changed files with 98 additions and 73 deletions

View File

@ -1135,7 +1135,6 @@ class ActionComm extends CommonObject
if ($this->type_code != 'AC_OTH_AUTO') $labeltype = $langs->trans('ActionAC_MANUAL'); if ($this->type_code != 'AC_OTH_AUTO') $labeltype = $langs->trans('ActionAC_MANUAL');
} }
$tooltip = '<u>' . $langs->trans('ShowAction'.$objp->code) . '</u>'; $tooltip = '<u>' . $langs->trans('ShowAction'.$objp->code) . '</u>';
if (! empty($this->ref)) if (! empty($this->ref))
$tooltip .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref; $tooltip .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
@ -1204,10 +1203,13 @@ class ActionComm extends CommonObject
{ {
$libelle.=(($this->type_code && $libelle!=$langs->transnoentities("Action".$this->type_code) && $langs->transnoentities("Action".$this->type_code)!="Action".$this->type_code)?' ('.$langs->transnoentities("Action".$this->type_code).')':''); $libelle.=(($this->type_code && $libelle!=$langs->transnoentities("Action".$this->type_code) && $langs->transnoentities("Action".$this->type_code)!="Action".$this->type_code)?' ('.$langs->transnoentities("Action".$this->type_code).')':'');
} }
$result.=$linkstart.img_object(($notooltip?'':$langs->trans("ShowAction").': '.$libelle), ($overwritepicto?$overwritepicto:'action'), ($notooltip?'class="valigntextbottom"':'class="classfortooltip valigntextbottom"'), 0, 0, $notooltip?0:1).$linkend;
} }
if ($withpicto==1) $result.=' ';
$result.=$linkstart.$libelleshort.$linkend; $result.=$linkstart;
if ($withpicto) $result.=img_object(($notooltip?'':$langs->trans("ShowAction").': '.$libelle), ($overwritepicto?$overwritepicto:'action'), ($notooltip?'class="'.(($withpicto != 2) ? 'paddingright ' : '').'valigntextbottom"':'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip valigntextbottom"'), 0, 0, $notooltip?0:1);
$result.=$libelleshort;
$result.=$linkend;
return $result; return $result;
} }

View File

@ -3357,11 +3357,11 @@ class Propal extends CommonObject
$linkstart.=$linkclose.'>'; $linkstart.=$linkclose.'>';
$linkend='</a>'; $linkend='</a>';
if ($withpicto) $result .= $linkstart;
$result.=($linkstart.img_object(($notooltip?'':$label), $this->picto, ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend); if ($withpicto) $result.=img_object(($notooltip?'':$label), $this->picto, ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
if ($withpicto && $withpicto != 2) if ($withpicto != 2) $result.= $this->ref;
$result.=' '; $result .= $linkend;
$result.=$linkstart.$this->ref.$linkend;
return $result; return $result;
} }

View File

@ -3401,7 +3401,6 @@ class Commande extends CommonOrder
if ($short) return $url; if ($short) return $url;
$picto = 'order';
$label = ''; $label = '';
if ($user->rights->commande->lire) { if ($user->rights->commande->lire) {
@ -3435,9 +3434,11 @@ class Commande extends CommonOrder
$linkstart.=$linkclose.'>'; $linkstart.=$linkclose.'>';
$linkend='</a>'; $linkend='</a>';
if ($withpicto) $result.=($linkstart.img_object(($notooltip?'':$label), $picto, ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend); $result .= $linkstart;
if ($withpicto && $withpicto != 2) $result.=' '; if ($withpicto) $result.=img_object(($notooltip?'':$label), $this->picto, ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
$result.=$linkstart.$this->ref.$linkend; if ($withpicto != 2) $result.= $this->ref;
$result .= $linkend;
return $result; return $result;
} }

View File

@ -1324,11 +1324,14 @@ class Account extends CommonObject
if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1'; if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
} }
$link = '<a href="'.$url.$linkclose; $linkstart = '<a href="'.$url.$linkclose;
$linkend='</a>'; $linkend = '</a>';
$result .= $linkstart;
if ($withpicto) $result.=img_object(($notooltip?'':$label), $this->picto, ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
if ($withpicto != 2) $result.= $this->ref.($option == 'reflabel' && $this->label ? ' - '.$this->label : '');
$result .= $linkend;
if ($withpicto) $result.=($link.img_object($label, 'account', 'class="classfortooltip"').$linkend.' ');
$result.=$link.$this->ref.($option == 'reflabel' && $this->label ? ' - '.$this->label : '').$linkend;
return $result; return $result;
} }

View File

@ -1161,9 +1161,10 @@ class Facture extends CommonInvoice
$linkstart.=$linkclose.'>'; $linkstart.=$linkclose.'>';
$linkend='</a>'; $linkend='</a>';
if ($withpicto) $result.=($linkstart.img_object(($notooltip?'':$label), $picto, ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend); $result .= $linkstart;
if ($withpicto && $withpicto != 2) $result.=' '; if ($withpicto) $result.=img_object(($notooltip?'':$label), $picto, ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
if ($withpicto != 2) $result.=$linkstart.($max?dol_trunc($this->ref,$max):$this->ref).$linkend; if ($withpicto != 2) $result.= ($max?dol_trunc($this->ref,$max):$this->ref);
$result .= $linkend;
if ($addlinktonotes) if ($addlinktonotes)
{ {

View File

@ -40,6 +40,7 @@ class Contact extends CommonObject
public $element='contact'; public $element='contact';
public $table_element='socpeople'; public $table_element='socpeople';
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
public $picto = 'contact';
public $civility_id; // In fact we store civility_code public $civility_id; // In fact we store civility_code
public $civility_code; public $civility_code;
@ -1053,8 +1054,12 @@ class Contact extends CommonObject
$linkend='</a>'; $linkend='</a>';
} }
if ($withpicto) $result.=($linkstart.img_object($label, 'contact', 'class="classfortooltip"').$linkend.' ');
$result.=$linkstart.($maxlen?dol_trunc($this->getFullName($langs),$maxlen):$this->getFullName($langs)).$linkend; $result.=$linkstart;
if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip valigntextbottom"'), 0, 0, $notooltip?0:1);
if ($withpicto != 2) $result.=($maxlen?dol_trunc($this->getFullName($langs),$maxlen):$this->getFullName($langs));
$result.=$linkend;
return $result; return $result;
} }

View File

@ -1878,7 +1878,6 @@ class Contrat extends CommonObject
if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1'; if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
//} //}
$picto = 'contract';
$label = ''; $label = '';
if ($user->rights->contrat->lire) { if ($user->rights->contrat->lire) {
@ -1913,9 +1912,11 @@ class Contrat extends CommonObject
$linkstart.=$linkclose.'>'; $linkstart.=$linkclose.'>';
$linkend='</a>'; $linkend='</a>';
if ($withpicto) $result.=($linkstart.img_object(($notooltip?'':$label), $picto, ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend); $result .= $linkstart;
if ($withpicto && $withpicto != 2) $result.=' '; if ($withpicto) $result.=img_object(($notooltip?'':$label), $this->picto, ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
$result.=$linkstart.$this->ref.$linkend; if ($withpicto != 2) $result.= $this->ref;
$result .= $linkend;
return $result; return $result;
} }

View File

@ -1504,11 +1504,11 @@ class Expedition extends CommonObject
$linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">'; $linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
$linkend='</a>'; $linkend='</a>';
$picto='sending'; $result .= $linkstart;
if ($withpicto) $result.=img_object(($notooltip?'':$label), $this->picto, ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
if ($withpicto != 2) $result.= $this->ref;
$result .= $linkend;
if ($withpicto) $result.=($linkstart.img_object(($notooltip?'':$label), $picto, ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend);
if ($withpicto && $withpicto != 2) $result.=' ';
$result.=$linkstart.$this->ref.$linkend;
return $result; return $result;
} }

View File

@ -1544,7 +1544,6 @@ class ExpenseReport extends CommonObject
if ($short) return $url; if ($short) return $url;
$picto='trip';
$label = '<u>' . $langs->trans("ShowExpenseReport") . '</u>'; $label = '<u>' . $langs->trans("ShowExpenseReport") . '</u>';
if (! empty($this->ref)) if (! empty($this->ref))
$label .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref; $label .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
@ -1583,8 +1582,11 @@ class ExpenseReport extends CommonObject
$linkstart.=$linkclose.'>'; $linkstart.=$linkclose.'>';
$linkend='</a>'; $linkend='</a>';
if ($withpicto) $result.=($linkstart.img_object(($notooltip?'':$label), $picto, ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend.' '); $result .= $linkstart;
$result.=$linkstart.($max?dol_trunc($ref,$max):$ref).$linkend; if ($withpicto) $result.=img_object(($notooltip?'':$label), $this->picto, ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
if ($withpicto != 2) $result.=($max?dol_trunc($ref,$max):$ref);
$result .= $linkend;
return $result; return $result;
} }

View File

@ -671,7 +671,6 @@ class Fichinter extends CommonObject
if (! empty($this->ref)) if (! empty($this->ref))
$label .= '<br><b>' . $langs->trans('Ref') . ':</b> '.$this->ref; $label .= '<br><b>' . $langs->trans('Ref') . ':</b> '.$this->ref;
$picto='intervention';
$url = DOL_URL_ROOT.'/fichinter/card.php?id='.$this->id; $url = DOL_URL_ROOT.'/fichinter/card.php?id='.$this->id;
if ($option !== 'nolink') if ($option !== 'nolink')
@ -698,9 +697,11 @@ class Fichinter extends CommonObject
$linkstart.=$linkclose.'>'; $linkstart.=$linkclose.'>';
$linkend='</a>'; $linkend='</a>';
if ($withpicto) $result.=($linkstart.img_object(($notooltip?'':$label), $picto, ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend); $result .= $linkstart;
if ($withpicto && $withpicto != 2) $result.=' '; if ($withpicto) $result.=img_object(($notooltip?'':$label), $this->picto, ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
if ($withpicto != 2) $result.=$linkstart.$this->ref.$linkend; if ($withpicto != 2) $result.= $this->ref;
$result .= $linkend;
return $result; return $result;
} }

View File

@ -1344,11 +1344,6 @@ if (! empty($conf->projet->enabled)) { $formproject = new FormProjets($db); }
$help_url='EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; $help_url='EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores';
llxHeader('',$langs->trans("Order"),$help_url); llxHeader('',$langs->trans("Order"),$help_url);
/* *************************************************************************** */
/* */
/* Mode vue et edition */
/* */
/* *************************************************************************** */
$now=dol_now(); $now=dol_now();
if ($action=='create') if ($action=='create')

View File

@ -828,7 +828,7 @@ class Holiday extends CommonObject
global $langs; global $langs;
$result=''; $result='';
$picto='holiday';
$label=$langs->trans("Show").': '.$this->ref; $label=$langs->trans("Show").': '.$this->ref;
$url = DOL_URL_ROOT.'/holiday/card.php?id='.$this->id; $url = DOL_URL_ROOT.'/holiday/card.php?id='.$this->id;
@ -844,9 +844,11 @@ class Holiday extends CommonObject
$linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">'; $linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
$linkend='</a>'; $linkend='</a>';
if ($withpicto) $result.=($linkstart.img_object($label, $picto, 'class="classfortooltip"').$linkend); $result .= $linkstart;
if ($withpicto && $withpicto != 2) $result.=' '; if ($withpicto) $result.=img_object(($notooltip?'':$label), $this->picto, ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
if ($withpicto != 2) $result.=$linkstart.$this->ref.$linkend; if ($withpicto != 2) $result.= $this->ref;
$result .= $linkend;
return $result; return $result;
} }

View File

@ -310,12 +310,12 @@ class MyObject extends CommonObject
$linkstart.=$linkclose.'>'; $linkstart.=$linkclose.'>';
$linkend='</a>'; $linkend='</a>';
if ($withpicto) $result .= $linkstart;
{ if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
$result.=($linkstart.img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?'':'class="classfortooltip"')).$linkend); if ($withpicto != 2) $result.= $this->ref;
if ($withpicto != 2) $result.=' '; $result .= $linkend;
} //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : '');
$result.= $linkstart . $this->ref . $linkend;
return $result; return $result;
} }

View File

@ -3503,11 +3503,13 @@ class Product extends CommonObject
$linkstart.=$linkclose.'>'; $linkstart.=$linkclose.'>';
$linkend='</a>'; $linkend='</a>';
$result.=$linkstart;
if ($withpicto) { if ($withpicto) {
if ($this->type == Product::TYPE_PRODUCT) $result.=($linkstart.img_object(($notooltip?'':$label), 'product', ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend.' '); if ($this->type == Product::TYPE_PRODUCT) $result.=(img_object(($notooltip?'':$label), 'product', ($notooltip?'class="paddingright"':'class="paddingright classfortooltip"'), 0, 0, $notooltip?0:1));
if ($this->type == Product::TYPE_SERVICE) $result.=($linkstart.img_object(($notooltip?'':$label), 'service', ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend.' '); if ($this->type == Product::TYPE_SERVICE) $result.=(img_object(($notooltip?'':$label), 'service', ($notooltip?'class="paddinright"':'class="paddingright classfortooltip"'), 0, 0, $notooltip?0:1));
} }
$result.=$linkstart.$newref.$linkend; $result.= $newref;
$result.= $linkend;
return $result; return $result;
} }

View File

@ -1018,15 +1018,18 @@ class Project extends CommonObject
} }
$picto = 'projectpub'; $picto = 'projectpub';
if (!$this->public) $picto = 'project'; if (! $this->public) $picto = 'project';
$linkstart = '<a href="'.$url.'"'; $linkstart = '<a href="'.$url.'"';
$linkstart.=$linkclose.'>'; $linkstart.=$linkclose.'>';
$linkend='</a>'; $linkend='</a>';
if ($withpicto) $result.=($linkstart . img_object(($notooltip?'':$label), $picto, ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1) . $linkend); $result .= $linkstart;
if ($withpicto && $withpicto != 2) $result.=' '; if ($withpicto) $result.=img_object(($notooltip?'':$label), $picto, ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
if ($withpicto != 2) $result.=$linkstart . $this->ref . $linkend . (($addlabel && $this->title) ? $sep . dol_trunc($this->title, ($addlabel > 1 ? $addlabel : 0)) : ''); if ($withpicto != 2) $result.= $this->ref;
$result .= $linkend;
if ($withpicto != 2) $result.=(($addlabel && $this->title) ? $sep . dol_trunc($this->title, ($addlabel > 1 ? $addlabel : 0)) : '');
return $result; return $result;
} }

View File

@ -632,9 +632,12 @@ class Task extends CommonObject
$picto='projecttask'; $picto='projecttask';
if ($withpicto) $result.=($linkstart.img_object(($notooltip?'':$label), $picto, ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend); $result .= $linkstart;
if ($withpicto && $withpicto != 2) $result.=' '; if ($withpicto) $result.=img_object(($notooltip?'':$label), $picto, ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
if ($withpicto != 2) $result.=$linkstart.$this->ref.$linkend . (($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); if ($withpicto != 2) $result.= $this->ref;
$result .= $linkend;
if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : '');
return $result; return $result;
} }

View File

@ -46,6 +46,7 @@ class Societe extends CommonObject
public $fieldsforcombobox='nom,name_alias'; public $fieldsforcombobox='nom,name_alias';
protected $childtables=array("supplier_proposal"=>'SupplierProposal',"propal"=>'Proposal',"commande"=>'Order',"facture"=>'Invoice',"facture_rec"=>'RecurringInvoiceTemplate',"contrat"=>'Contract',"fichinter"=>'Fichinter',"facture_fourn"=>'SupplierInvoice',"commande_fournisseur"=>'SupplierOrder',"projet"=>'Project',"expedition"=>'Shipment',"prelevement_lignes"=>'DirectDebitRecord'); // To test if we can delete object protected $childtables=array("supplier_proposal"=>'SupplierProposal',"propal"=>'Proposal',"commande"=>'Order',"facture"=>'Invoice',"facture_rec"=>'RecurringInvoiceTemplate',"contrat"=>'Contract',"fichinter"=>'Fichinter',"facture_fourn"=>'SupplierInvoice',"commande_fournisseur"=>'SupplierOrder',"projet"=>'Project',"expedition"=>'Shipment',"prelevement_lignes"=>'DirectDebitRecord'); // To test if we can delete object
protected $childtablesoncascade=array("societe_prices", "societe_log", "societe_address", "product_fournisseur_price", "product_customer_price_log", "product_customer_price", "socpeople", "adherent", "societe_rib", "societe_remise", "societe_remise_except", "societe_commerciaux", "categorie", "notify", "notify_def", "actioncomm"); protected $childtablesoncascade=array("societe_prices", "societe_log", "societe_address", "product_fournisseur_price", "product_customer_price_log", "product_customer_price", "socpeople", "adherent", "societe_rib", "societe_remise", "societe_remise_except", "societe_commerciaux", "categorie", "notify", "notify_def", "actioncomm");
public $picto = 'company';
/** /**
* 0=No test on entity, 1=Test with field entity, 2=Test with link by societe * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
@ -2007,9 +2008,10 @@ class Societe extends CommonObject
$linkend=''; $linkend='';
} }
if ($withpicto) $result.=($linkstart.img_object(($notooltip?'':$label), 'company', ($notooltip?'':'class="classfortooltip valigntextbottom"'), 0, 0, $notooltip?0:1).$linkend); $result.=$linkstart;
if ($withpicto && $withpicto != 2) $result.=' '; if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip valigntextbottom"'), 0, 0, $notooltip?0:1);
if ($withpicto != 2) $result.=$linkstart.($maxlen?dol_trunc($name,$maxlen):$name).$linkend; if ($withpicto != 2) $result.=($maxlen?dol_trunc($name,$maxlen):$name);
$result.=$linkend;
return $result; return $result;
} }

View File

@ -2131,7 +2131,7 @@ class User extends CommonObject
if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1'; if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
} }
$link='<a href="'.$url.'"'; $linkstart='<a href="'.$url.'"';
$linkclose=""; $linkclose="";
if (empty($notooltip)) if (empty($notooltip))
{ {
@ -2154,11 +2154,11 @@ class User extends CommonObject
$reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) $linkclose = $hookmanager->resPrint; if ($reshook > 0) $linkclose = $hookmanager->resPrint;
$link.=$linkclose.'>'; $linkstart.=$linkclose.'>';
$linkend='</a>'; $linkend='</a>';
//if ($withpictoimg == -1) $result.='<div class="nowrap">'; //if ($withpictoimg == -1) $result.='<div class="nowrap">';
$result.=$link; $result.=$linkstart;
if ($withpictoimg) if ($withpictoimg)
{ {
$paddafterimage=''; $paddafterimage='';
@ -2185,7 +2185,7 @@ class User extends CommonObject
} }
/** /**
* Renvoie login clicable (avec eventuellement le picto) * Return clickable link of login (eventualy with picto)
* *
* @param int $withpicto Include picto into link * @param int $withpicto Include picto into link
* @param string $option Sur quoi pointe le lien * @param string $option Sur quoi pointe le lien
@ -2197,17 +2197,19 @@ class User extends CommonObject
$result=''; $result='';
$link = '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'">'; $linkstart = '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'">';
$linkend='</a>'; $linkend='</a>';
if ($option == 'xxx') if ($option == 'xxx')
{ {
$link = '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'">'; $linkstart = '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'">';
$linkend='</a>'; $linkend='</a>';
} }
if ($withpicto) $result.=($link.img_object($langs->trans("ShowUser"),'user').$linkend.' '); $result.=$linkstart;
$result.=$link.$this->login.$linkend; if ($withpicto) $result.=img_object($langs->trans("ShowUser"), 'user', 'class="paddingright"');
$result.=$this->login;
$result.=$linkend;
return $result; return $result;
} }