mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
Work on multicompany
This commit is contained in:
@@ -1063,22 +1063,25 @@ function dol_trunc($string,$size=40,$trunc='right',$stringencoding='UTF-8')
|
||||
|
||||
|
||||
/**
|
||||
* \brief Show a picto according to module/object (generic function)
|
||||
* \param alt Text of alt on image
|
||||
* \param object Objet pour lequel il faut afficher le logo (example: user, group, action, bill, contract, propal, product, ...)
|
||||
* Show a picto according to module/object (generic function)
|
||||
* @param alt Text of alt on image
|
||||
* @param object Objet pour lequel il faut afficher le logo (example: user, group, action, bill, contract, propal, product, ...)
|
||||
* Pour les modules externe utiliser nomimage@mymodule pour rechercher dans le repertoire "img" du module
|
||||
* @param cssclass Define a specific css class
|
||||
* \return string Retourne tag img
|
||||
*/
|
||||
function img_object($alt, $object)
|
||||
function img_object($alt, $object, $cssclass='')
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
$cssclass = (!empty($cssclass)?'class="'.$cssclass.'"':'');
|
||||
|
||||
if (preg_match('/^([^@]+)@([^@]+)$/i',$object,$regs))
|
||||
{
|
||||
return '<img src="'.DOL_URL_ROOT.'/'.$regs[2].'/img/object_'.$regs[1].'.png" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'">';
|
||||
return '<img src="'.DOL_URL_ROOT.'/'.$regs[2].'/img/object_'.$regs[1].'.png" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'" '.$cssclass.'>';
|
||||
}
|
||||
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/object_'.$object.'.png" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'">';
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/object_'.$object.'.png" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'" '.$cssclass.'>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user