Add tooltip in getNomUrl link

This commit is contained in:
frederic34 2015-01-20 20:45:38 +01:00
parent 67debbe37d
commit 1b0dd671b3
39 changed files with 153 additions and 151 deletions

View File

@ -1559,25 +1559,26 @@ class Adherent extends CommonObject
global $langs;
$result='';
$label=$langs->trans("ShowMember").': '.$this->ref;
$linkclose = '" title="'.$label.'" class="classfortooltip">';
if ($option == 'card')
{
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/card.php?rowid='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/card.php?rowid='.$this->id.$linkclose;
$lienfin='</a>';
}
if ($option == 'subscription')
{
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/card_subscriptions.php?rowid='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/card_subscriptions.php?rowid='.$this->id.$linkclose;
$lienfin='</a>';
}
if ($option == 'category')
{
$lien = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&type=3">';
$lien = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&type=3'.$linkclose;
$lienfin='</a>';
}
$picto='user';
$label=$langs->trans("ShowMember");
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';

View File

@ -270,12 +270,12 @@ class AdherentType extends CommonObject
global $langs;
$result='';
$label=$langs->trans("ShowTypeCard",$this->libelle);
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/type.php?rowid='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/type.php?rowid='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
$picto='group';
$label=$langs->trans("ShowTypeCard",$this->libelle);
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';

View File

@ -264,12 +264,12 @@ class Cotisation extends CommonObject
global $langs;
$result='';
$label=$langs->trans("ShowSubscription").': '.$this->ref;
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/fiche_subscription.php?rowid='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/fiche_subscription.php?rowid='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
$picto='payment';
$label=$langs->trans("ShowSubscription");
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';

View File

@ -1274,9 +1274,9 @@ class Categorie extends CommonObject
global $langs;
$result='';
$lien = '<a href="'.DOL_URL_ROOT.'/categories/viewcat.php?id='.$this->id.'&type='.$this->type.'">';
$label=$langs->trans("ShowCategory").': '. ($this->ref?$this->ref:$this->label);
$lien = '<a href="'.DOL_URL_ROOT.'/categories/viewcat.php?id='.$this->id.'&type='.$this->type.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
$picto='category';

View File

@ -897,11 +897,12 @@ class ActionComm extends CommonObject
global $conf,$langs;
$result='';
if ($option=='birthday') $lien = '<a '.($classname?'class="'.$classname.'" ':'').'href="'.DOL_URL_ROOT.'/contact/perso.php?id='.$this->id.'">';
else $lien = '<a '.($classname?'class="'.$classname.'" ':'').'href="'.DOL_URL_ROOT.'/comm/action/card.php?id='.$this->id.'">';
$lienfin='</a>';
$label=$this->label;
if (empty($label)) $label=$this->libelle; // For backward compatibility
$linkclose = '" title="'.$label.'" class="classfortooltip">';
if ($option=='birthday') $lien = '<a '.($classname?'class="'.$classname.'" ':'').'href="'.DOL_URL_ROOT.'/contact/perso.php?id='.$this->id.$linkclose;
else $lien = '<a '.($classname?'class="'.$classname.'" ':'').'href="'.DOL_URL_ROOT.'/comm/action/card.php?id='.$this->id.$linkclose;
$lienfin='</a>';
//print 'rrr'.$this->libelle.'-'.$withpicto;
if ($withpicto == 2)

View File

@ -2605,29 +2605,29 @@ class Propal extends CommonObject
global $langs;
$result='';
if ($option == '')
{
$lien = '<a href="'.DOL_URL_ROOT.'/comm/propal.php?id='.$this->id. $get_params .'">';
$label=$langs->trans("ShowPropal").': '.$this->ref;
$linkclose = '" title="'.$label.'" class="classfortooltip">';
if ($option == '') {
$lien = '<a href="'.DOL_URL_ROOT.'/comm/propal.php?id='.$this->id. $get_params .$linkclose;
}
if ($option == 'compta') // deprecated
{
$lien = '<a href="'.DOL_URL_ROOT.'/comm/propal.php?id='.$this->id. $get_params .'">';
if ($option == 'compta') { // deprecated
$lien = '<a href="'.DOL_URL_ROOT.'/comm/propal.php?id='.$this->id. $get_params .$linkclose;
}
if ($option == 'expedition')
{
$lien = '<a href="'.DOL_URL_ROOT.'/expedition/propal.php?id='.$this->id. $get_params .'">';
if ($option == 'expedition') {
$lien = '<a href="'.DOL_URL_ROOT.'/expedition/propal.php?id='.$this->id. $get_params .$linkclose;
}
if ($option == 'document')
{
$lien = '<a href="'.DOL_URL_ROOT.'/comm/propal/document.php?id='.$this->id. $get_params .'">';
if ($option == 'document') {
$lien = '<a href="'.DOL_URL_ROOT.'/comm/propal/document.php?id='.$this->id. $get_params .$linkclose;
}
$lienfin='</a>';
$picto='propal';
$label=$langs->trans("ShowPropal").': '.$this->ref;
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';
if ($withpicto)
$result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2)
$result.=' ';
$result.=$lien.$this->ref.$lienfin;
return $result;
}

View File

@ -2884,12 +2884,12 @@ class Commande extends CommonOrder
if ($short) return $url;
$linkstart = '<a href="'.$url.'">';
$linkend='</a>';
$picto='order';
$label=$langs->trans("ShowOrder").': '.$this->ref;
$linkstart = '<a href="'.$url.'" title="'.$label.'" class="classfortooltip">';
$linkend='</a>';
if ($withpicto) $result.=($linkstart.img_object($label, $picto, 'class="classfortooltip"').$linkend);
if ($withpicto && $withpicto != 2) $result.=' ';
$result.=$linkstart.$this->ref.$linkend;

View File

@ -935,15 +935,16 @@ class Account extends CommonObject
global $langs;
$result='';
$linkclose = '" title="'.$this->label.'" class="classfortooltip">';
if (empty($mode))
{
$lien = '<a href="'.DOL_URL_ROOT.'/compta/bank/card.php?id='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/compta/bank/card.php?id='.$this->id.$linkclose;
$lienfin='</a>';
}
else if ($mode == 'transactions')
{
$lien = '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$this->id.$linkclose;
$lienfin='</a>';
}
@ -1483,11 +1484,11 @@ class AccountLine extends CommonObject
global $langs;
$result='';
$lien = '<a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$this->rowid.'">';
$label=$langs->trans("ShowTransaction").': '.$this->rowid;
$lien = '<a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$this->rowid.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowTransaction"), 'account', 'class="classfortooltip"').$lienfin.' ');
if ($withpicto) $result.=($lien.img_object($label, 'account', 'class="classfortooltip"').$lienfin.' ');
$result.=$lien.$this->rowid.$lienfin;
if ($option == 'showall' || $option == 'showconciliated') $result.=' (';

View File

@ -357,13 +357,13 @@ class Deplacement extends CommonObject
global $langs;
$result='';
$label=$langs->trans("Show").': '.$this->ref;
$lien = '<a href="'.DOL_URL_ROOT.'/compta/deplacement/card.php?id='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/compta/deplacement/card.php?id='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
$picto='trip';
$label=$langs->trans("Show").': '.$this->ref;
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';

View File

@ -711,13 +711,13 @@ class Don extends CommonObject
global $langs;
$result='';
$label=$langs->trans("ShowDonation").': '.$this->id;
$lien = '<a href="'.DOL_URL_ROOT.'/compta/dons/card.php?rowid='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/compta/dons/card.php?rowid='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
$picto='generic';
$label=$langs->trans("ShowDonation").': '.$this->id;
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';

View File

@ -558,13 +558,13 @@ class FactureRec extends Facture
global $langs;
$result='';
$label=$langs->trans("ShowInvoice").': '.$this->ref;
$lien = '<a href="'.DOL_URL_ROOT.'/compta/facture/fiche-rec.php?facid='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/compta/facture/fiche-rec.php?facid='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
$picto='bill';
$label=$langs->trans("ShowInvoice").': '.$this->ref;
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';

View File

@ -865,7 +865,7 @@ class Facture extends CommonInvoice
if ($this->type == self::TYPE_SITUATION) $label=$langs->transnoentitiesnoconv("ShowInvoiceSituation").': '.$this->ref;
if ($moretitle) $label.=' - '.$moretitle;
$linkstart='<a href="'.$url.'">';
$linkstart='<a href="'.$url.'" title="'.$label.'" class="classfortooltip">';
$linkend='</a>';
if ($withpicto) $result.=($linkstart.img_object(($max?dol_trunc($label,$max):$label), $picto, 'class="classfortooltip"').$linkend);

View File

@ -585,12 +585,12 @@ class Localtax extends CommonObject
global $langs;
$result='';
$label=$langs->trans("ShowVatPayment").': '.$this->ref;
$lien = '<a href="'.DOL_URL_ROOT.'/compta/localtax/card.php?id='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/compta/localtax/card.php?id='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
$picto='payment';
$label=$langs->trans("ShowVatPayment").': '.$this->ref;
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';

View File

@ -769,11 +769,12 @@ class RemiseCheque extends CommonObject
global $langs;
$result='';
$label = $langs->trans("ShowCheckReceipt").': '.$this->ref;
$lien = '<a href="'.DOL_URL_ROOT.'/compta/paiement/cheque/card.php?id='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/compta/paiement/cheque/card.php?id='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCheckReceipt"), 'payment', 'class="classfortooltip"').$lienfin);
if ($withpicto) $result.=($lien.img_object($label, 'payment', 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';
if ($withpicto != 2) $result.=$lien.$this->ref.$lienfin;

View File

@ -748,8 +748,9 @@ class Paiement extends CommonObject
global $langs;
$result='';
$label = $langs->trans("ShowPayment").': '.$this->ref;
$lien = '<a href="'.DOL_URL_ROOT.'/compta/paiement/card.php?id='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/compta/paiement/card.php?id='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowPayment"), 'payment', 'class="classfortooltip"').$lienfin);

View File

@ -1118,17 +1118,18 @@ class BonPrelevement extends CommonObject
global $langs;
$result='';
$label = $langs->trans("ShowWithdraw").': '.$this->ref;
$lien = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
if ($option == 'xxx')
{
$lien = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
}
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowWithdraw"), 'payment', 'class="classfortooltip"').$lienfin.' ');
if ($withpicto) $result.=($lien.img_object($label, 'payment', 'class="classfortooltip"').$lienfin.' ');
$result.=$lien.$this->ref.$lienfin;
return $result;
}

View File

@ -486,12 +486,12 @@ class PaymentSalary extends CommonObject
global $langs;
$result='';
$label=$langs->trans("ShowSalaryPayment").': '.$this->ref;
$lien = '<a href="'.DOL_URL_ROOT.'/compta/salaries/card.php?id='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/compta/salaries/card.php?id='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
$picto='payment';
$label=$langs->trans("ShowSalaryPayment").': '.$this->ref;
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';

View File

@ -420,11 +420,12 @@ class ChargeSociales extends CommonObject
$result='';
if (empty($this->ref)) $this->ref=$this->lib;
$label = $langs->trans("ShowSocialContribution").': '.$this->ref;
$lien = '<a href="'.DOL_URL_ROOT.'/compta/sociales/charges.php?id='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/compta/sociales/charges.php?id='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowSocialContribution").': '.$this->lib, 'bill', 'class="classfortooltip"').$lienfin.' ');
if ($withpicto) $result.=($lien.img_object($label, 'bill', 'class="classfortooltip"').$lienfin.' ');
if ($withpicto && $withpicto != 2) $result.=' ';
if ($withpicto != 2) $result.=$lien.($maxlen?dol_trunc($this->ref,$maxlen):$this->ref).$lienfin;
return $result;

View File

@ -585,13 +585,14 @@ class PaymentSocialContribution extends CommonObject
$result='';
if (empty($this->ref)) $this->ref=$this->lib;
$label = $langs->trans("ShowPayment").': '.$this->ref;
if (!empty($this->id))
{
$lien = '<a href="'.DOL_URL_ROOT.'/compta/payment_sc/card.php?id='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/compta/payment_sc/card.php?id='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowPayment").': '.$this->ref, 'payment', 'class="classfortooltip"').$lienfin.' ');
if ($withpicto) $result.=($lien.img_object($label, 'payment', 'class="classfortooltip"').$lienfin.' ');
if ($withpicto && $withpicto != 2) $result.=' ';
if ($withpicto != 2) $result.=$lien.($maxlen?dol_trunc($this->ref,$maxlen):$this->ref).$lienfin;
}

View File

@ -638,12 +638,12 @@ class Tva extends CommonObject
global $langs;
$result='';
$label=$langs->trans("ShowVatPayment").': '.$this->ref;
$lien = '<a href="'.DOL_URL_ROOT.'/compta/tva/card.php?id='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/compta/tva/card.php?id='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
$picto='payment';
$label=$langs->trans("ShowVatPayment").': '.$this->ref;
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';

View File

@ -887,17 +887,18 @@ class Contact extends CommonObject
global $langs;
$result='';
$label = $langs->trans("ShowContact").': '.$this->getFullName($langs);
$lien = '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$this->id.$moreparam.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$this->id.$moreparam.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
if ($option == 'xxx')
{
$lien = '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$this->id.$moreparam.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$this->id.$moreparam.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
}
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowContact").': '.$this->getFullName($langs), 'contact', 'class="classfortooltip"').$lienfin.' ');
if ($withpicto) $result.=($lien.img_object($label, 'contact', 'class="classfortooltip"').$lienfin.' ');
$result.=$lien.($maxlen?dol_trunc($this->getFullName($langs),$maxlen):$this->getFullName($langs)).$lienfin;
return $result;
}

View File

@ -1682,13 +1682,13 @@ class Contrat extends CommonObject
global $langs;
$result='';
$label=$langs->trans("ShowContract").': '.$this->ref;
$lien = '<a href="'.DOL_URL_ROOT.'/contrat/card.php?id='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/contrat/card.php?id='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
$picto='contract';
$label=$langs->trans("ShowContract").': '.$this->ref;
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';
@ -2211,13 +2211,13 @@ class ContratLigne extends CommonObject
global $langs;
$result='';
$label=$langs->trans("ShowContractOfService").': '.$this->label;
$lien = '<a href="'.DOL_URL_ROOT.'/contrat/card.php?id='.$this->fk_contrat.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/contrat/card.php?id='.$this->fk_contrat.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
$picto='contract';
$label=$langs->trans("ShowContractOfService").': '.$this->label;
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';

View File

@ -435,17 +435,17 @@ class DiscountAbsolute
if ($option == 'invoice')
{
$lien = '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$this->fk_facture_source.'">';
$lienfin='</a>';
$label=$langs->trans("ShowDiscount").': '.$this->ref_facture_source;
$lien = '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$this->fk_facture_source.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
$ref=$this->ref_facture_source;
$picto='bill';
}
if ($option == 'discount')
{
$lien = '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$this->fk_soc.'">';
$lienfin='</a>';
$label=$langs->trans("Discount");
$lien = '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$this->fk_soc.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
$ref=$langs->trans("Discount");
$picto='generic';
}

View File

@ -414,19 +414,20 @@ class EcmDirectory // extends CommonObject
global $langs;
$result='';
//$newref=str_replace('_',' ',$this->ref);
$newref=$this->ref;
$newlabel=$langs->trans("ShowECMSection").': '.$newref;
$linkclose='"'.($more?' '.$more:'').' title="'.$newlabel.'" class="classfortooltip">';
$lien = '<a href="'.DOL_URL_ROOT.'/ecm/docmine.php?section='.$this->id.'"'.($more?' '.$more:'').'>';
if ($option == 'index') $lien = '<a href="'.DOL_URL_ROOT.'/ecm/index.php?section='.$this->id.'&amp;sectionexpand=true"'.($more?' '.$more:'').'>';
if ($option == 'indexexpanded') $lien = '<a href="'.DOL_URL_ROOT.'/ecm/index.php?section='.$this->id.'&amp;sectionexpand=false"'.($more?' '.$more:'').'>';
if ($option == 'indexnotexpanded') $lien = '<a href="'.DOL_URL_ROOT.'/ecm/index.php?section='.$this->id.'&amp;sectionexpand=true"'.($more?' '.$more:'').'>';
$lien = '<a href="'.DOL_URL_ROOT.'/ecm/docmine.php?section='.$this->id.$linkclose;
if ($option == 'index') $lien = '<a href="'.DOL_URL_ROOT.'/ecm/index.php?section='.$this->id.'&amp;sectionexpand=true'.$linkclose;
if ($option == 'indexexpanded') $lien = '<a href="'.DOL_URL_ROOT.'/ecm/index.php?section='.$this->id.'&amp;sectionexpand=false'.$linkclose;
if ($option == 'indexnotexpanded') $lien = '<a href="'.DOL_URL_ROOT.'/ecm/index.php?section='.$this->id.'&amp;sectionexpand=true'.$linkclose;
$lienfin='</a>';
//$picto=DOL_URL_ROOT.'/theme/common/treemenu/folder.gif';
$picto='dir';
//$newref=str_replace('_',' ',$this->ref);
$newref=$this->ref;
$newlabel=$langs->trans("ShowECMSection").': '.$newref;
if ($withpicto) $result.=($lien.img_object($newlabel, $picto, 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';

View File

@ -1217,16 +1217,16 @@ class Expedition extends CommonObject
global $langs;
$result='';
$label=$langs->trans("ShowSending").': '.$this->ref;
$url = DOL_URL_ROOT.'/expedition/card.php?id='.$this->id;
if ($short) return $url;
$linkstart = '<a href="'.$url.'">';
$linkstart = '<a href="'.$url.'" title="'.$label.'" class="classfortooltip">';
$linkend='</a>';
$picto='sending';
$label=$langs->trans("ShowSending").': '.$this->ref;
if ($withpicto) $result.=($linkstart.img_object($label, $picto, 'class="classfortooltip"').$linkend);
if ($withpicto && $withpicto != 2) $result.=' ';

View File

@ -547,13 +547,13 @@ class Fichinter extends CommonObject
global $langs;
$result='';
$label=$langs->trans("Show").': '.$this->ref;
$lien = '<a href="'.DOL_URL_ROOT.'/fichinter/card.php?id='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/fichinter/card.php?id='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
$picto='intervention';
$label=$langs->trans("Show").': '.$this->ref;
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';

View File

@ -531,12 +531,12 @@ class CommandeFournisseur extends CommonOrder
global $langs;
$result='';
$label=$langs->trans("ShowOrder").': '.$this->ref;
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/commande/card.php?id='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/commande/card.php?id='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
$picto='order';
$label=$langs->trans("ShowOrder").': '.$this->ref;
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';

View File

@ -1472,19 +1472,19 @@ class FactureFournisseur extends CommonInvoice
global $langs;
$result='';
$label=$langs->trans("ShowInvoice").': '.$this->ref;
if ($this->ref_supplier) $label.=' / '.$this->ref_supplier;
if ($option == 'document')
{
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/facture/document.php?facid='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/facture/document.php?facid='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
}
else
{
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
}
$label=$langs->trans("ShowInvoice").': '.$this->ref;
if ($this->ref_supplier) $label.=' / '.$this->ref_supplier;
$ref=$this->ref;
if (empty($ref)) $ref=$this->id;

View File

@ -487,17 +487,17 @@ class PaiementFourn extends Paiement
global $langs;
$result='';
$text=$this->ref; // Sometimes ref contains label
if (preg_match('/^\((.*)\)$/i',$text,$reg)) {
// Label generique car entre parentheses. On l'affiche en le traduisant
if ($reg[1]=='paiement') $reg[1]='Payment';
$text=$langs->trans($reg[1]);
}
$label = $langs->trans("ShowPayment").': '.$text;
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/paiement/card.php?id='.$this->id.'">';
$lienfin='</a>';
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/paiement/card.php?id='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
$text=$this->ref; // Sometimes ref contains label
if (preg_match('/^\((.*)\)$/i',$text,$reg))
{
// Label g诩rique car entre parenth粥s. On l'affiche en le traduisant
if ($reg[1]=='paiement') $reg[1]='Payment';
$text=$langs->trans($reg[1]);
}
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowPayment"), 'payment', 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';

View File

@ -658,14 +658,13 @@ class Holiday extends CommonObject
global $langs;
$result='';
$label=$langs->trans("Show").': '.$this->ref;
$lien = '<a href="'.DOL_URL_ROOT.'/holiday/card.php?id='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/holiday/card.php?id='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
$picto='holiday';
$label=$langs->trans("Show").': '.$this->ref;
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';
if ($withpicto != 2) $result.=$lien.$this->ref.$lienfin;

View File

@ -660,13 +660,13 @@ class Livraison extends CommonObject
$result='';
$urlOption='';
$label=$langs->trans("ShowReceiving").': '.$this->ref;
$lien = '<a href="'.DOL_URL_ROOT.'/livraison/card.php?id='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/livraison/card.php?id='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
$picto='sending';
$label=$langs->trans("ShowReceiving").': '.$this->ref;
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';

View File

@ -2812,33 +2812,27 @@ class Product extends CommonObject
global $langs;
$result='';
$newref=$this->ref;
if ($maxlength) $newref=dol_trunc($newref,$maxlength,'middle');
if ($this->type == 0) $label = $langs->trans("ShowProduct").': '.$this->ref.' '.$this->label;
if ($this->type == 1) $label = $langs->trans("ShowService").': '.$this->ref.' '.$this->label;
$linkclose = '" title="'.$label.'" class="classfortooltip">';
if ($option == 'supplier')
{
$lien = '<a href="'.DOL_URL_ROOT.'/product/fournisseurs.php?id='.$this->id.'">';
$lienfin='</a>';
}
else if ($option == 'stock')
{
$lien = '<a href="'.DOL_URL_ROOT.'/product/stock/product.php?id='.$this->id.'">';
if ($option == 'supplier') {
$lien = '<a href="'.DOL_URL_ROOT.'/product/fournisseurs.php?id='.$this->id.$linkclose;
$lienfin='</a>';
} else if ($option == 'stock') {
$lien = '<a href="'.DOL_URL_ROOT.'/product/stock/product.php?id='.$this->id.$linkclose;
$lienfin='</a>';
} else if ($option == 'composition') {
$lien = '<a href="'.DOL_URL_ROOT.'/product/composition/card.php?id='.$this->id.$linkclose;
$lienfin='</a>';
} else if ($option == 'category') {
$lien = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&amp;type=0'.$linkclose;
} else {
$lien = '<a href="'.DOL_URL_ROOT.'/product/card.php?id='.$this->id.$linkclose;
$lienfin='</a>';
}
else if ($option == 'composition')
{
$lien = '<a href="'.DOL_URL_ROOT.'/product/composition/card.php?id='.$this->id.'">';
$lienfin='</a>';
}
else if ($option == 'category')
{
$lien = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&type=0">';
}
else
{
$lien = '<a href="'.DOL_URL_ROOT.'/product/card.php?id='.$this->id.'">';
$lienfin='</a>';
}
$newref=$this->ref;
if ($maxlength) $newref=dol_trunc($newref,$maxlength,'middle');
if ($withpicto) {
if ($this->type == 0) $result.=($lien.img_object($langs->trans("ShowProduct").' '.$this->label, 'product', 'class="classfortooltip"').$lienfin.' ');

View File

@ -512,11 +512,12 @@ class Entrepot extends CommonObject
global $langs;
$result='';
$label = $langs->trans("ShowStock").': '.$this->libelle;
$lien='<a href="'.DOL_URL_ROOT.'/product/stock/card.php?id='.$this->id.'">';
$lienfin='</a>';
$lien='<a href="'.DOL_URL_ROOT.'/product/stock/card.php?id='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowStock"), 'stock', 'class="classfortooltip"').$lienfin.' ');
if ($withpicto) $result.=($lien.img_object($label, 'stock', 'class="classfortooltip"').$lienfin.' ');
$result.=$lien.$this->libelle.$lienfin;
return $result;
}

View File

@ -789,25 +789,22 @@ class Project extends CommonObject
$result = '';
$lien = '';
$lienfin = '';
$label = $langs->trans("ShowProject") . ': ' . $this->ref . ($this->title ? ' - ' . $this->title : '');
$linkclose = '" title="'.$label.'" class="classfortooltip">';
if ($option != 'nolink')
{
if (preg_match('/\.php$/',$option))
{
$lien = '<a href="' . dol_buildpath($option,1) . '?id=' . $this->id . '">';
$lienfin = '</a>';
}
else
{
$lien = '<a href="' . DOL_URL_ROOT . '/projet/card.php?id=' . $this->id . '">';
$lienfin = '</a>';
}
if ($option != 'nolink') {
if (preg_match('/\.php$/',$option)) {
$lien = '<a href="' . dol_buildpath($option,1) . '?id=' . $this->id . $linkclose;
$lienfin = '</a>';
} else {
$lien = '<a href="' . DOL_URL_ROOT . '/projet/card.php?id=' . $this->id . $linkclose;
$lienfin = '</a>';
}
}
$picto = 'projectpub';
if (!$this->public) $picto = 'project';
$label = $langs->trans("ShowProject") . ': ' . $this->ref . ($this->title ? ' - ' . $this->title : '');
if ($withpicto) $result.=($lien . img_object($label, $picto, 'class="classfortooltip"') . $lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';

View File

@ -505,13 +505,13 @@ class Task extends CommonObject
global $langs;
$result='';
$label=$langs->trans("ShowTask").': '.$this->ref.($this->label?' - '.$this->label:'');
$lien = '<a href="'.DOL_URL_ROOT.'/projet/tasks/'.$mode.'.php?id='.$this->id.($option=='withproject'?'&withproject=1':'').'">';
$lien = '<a href="'.DOL_URL_ROOT.'/projet/tasks/'.$mode.'.php?id='.$this->id.($option=='withproject'?'&withproject=1':'').'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
$picto='projecttask';
$label=$langs->trans("ShowTask").': '.$this->ref.($this->label?' - '.$this->label:'');
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';

View File

@ -869,10 +869,11 @@ class Resource extends CommonObject
global $langs;
$result='';
$label=$langs->trans("ShowResource").': '.$this->ref;
if ($option == '')
{
$lien = '<a href="'.dol_buildpath('/resource/card.php',1).'?id='.$this->id. $get_params .'">';
$lien = '<a href="'.dol_buildpath('/resource/card.php',1).'?id='.$this->id. $get_params .'" title="'.$label.'" class="classfortooltip">';
$picto='resource@resource';
$label=$langs->trans("ShowResource").': '.$this->ref;
@ -880,7 +881,6 @@ class Resource extends CommonObject
$lienfin='</a>';
$label=$langs->trans("ShowResource").': '.$this->ref;
if ($withpicto) $result.=($lien.img_object($label, $picto, 'class="classfortooltip"').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';

View File

@ -422,8 +422,9 @@ class Address
global $langs;
$result='';
$label = $langs->trans("ShowAddress").': '.$this->label;
$lien = '<a href="'.DOL_URL_ROOT.'/comm/address.php?id='.$this->id.'&socid='.$this->socid.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/comm/address.php?id='.$this->id.'&socid='.$this->socid.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowAddress").': '.$this->label, 'address', 'class="classfortooltip"').$lienfin.' ');

View File

@ -1749,7 +1749,7 @@ class Societe extends CommonObject
}
// Add type of canvas
$lien.=(!empty($this->canvas)?'&canvas='.$this->canvas:'').'">';
$lien.=(!empty($this->canvas)?'&canvas='.$this->canvas:'').'" title="'.$name.'" class="classfortooltip">';
$lienfin='</a>';
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCompany").': '.$name, 'company', 'class="classfortooltip"').$lienfin);

View File

@ -1786,13 +1786,13 @@ class User extends CommonObject
global $langs;
$result='';
$label = $langs->trans("ShowUser").': '.$this->getFullName($langs,'','',24);
$lien = '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'">';
$lien = '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'" title="'.$label.'" class="classfortooltip">';
$lienfin='</a>';
if ($withpicto)
{
$result.=($lien.img_object($langs->trans("ShowUser"), 'user', 'class="classfortooltip"').$lienfin);
if ($withpicto) {
$result.=($lien.img_object($label, 'user', 'class="classfortooltip"').$lienfin);
if ($withpicto != 2) $result.=' ';
}
$result.=$lien.$this->getFullName($langs,'','',24).$lienfin;