mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 09:08:09 +01:00
Add function getNomUrl on skeleton class.
This commit is contained in:
@@ -426,6 +426,44 @@ class Skeleton_Class extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a link to the user card (with optionaly the picto)
|
||||
* Use this->id,this->lastname, this->firstname
|
||||
*
|
||||
* @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
|
||||
* @param string $option On what the link point to
|
||||
* @param integer $notooltip 1=Disable tooltip
|
||||
* @param int $maxlen Max length of visible user name
|
||||
* @param string $morecss Add more css on link
|
||||
* @return string String with URL
|
||||
*/
|
||||
function getNomUrl($withpicto=0, $option='', $notooltip=0, $maxlen=24, $morecss='')
|
||||
{
|
||||
global $langs, $conf, $db;
|
||||
global $dolibarr_main_authentication, $dolibarr_main_demo;
|
||||
global $menumanager;
|
||||
|
||||
|
||||
$result = '';
|
||||
$companylink = '';
|
||||
|
||||
$label = '<u>' . $langs->trans("MyModule") . '</u>';
|
||||
$label.= '<div width="100%">';
|
||||
$label.= '<b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
|
||||
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/mymodule/card.php?id='.$this->id.'"';
|
||||
$link.= ($notooltip?'':' title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip'.($morecss?' '.$morecss:'').'"');
|
||||
$link.= '>';
|
||||
$linkend='</a>';
|
||||
|
||||
if ($withpicto)
|
||||
{
|
||||
$result.=($link.img_object(($notooltip?'':$label), 'label', ($notooltip?'':'class="classfortooltip"')).$linkend);
|
||||
if ($withpicto != 2) $result.=' ';
|
||||
}
|
||||
$result.= $link . $this->ref . $linkend;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne le libelle du status d'un user (actif, inactif)
|
||||
|
||||
Reference in New Issue
Block a user