New: Can force picto path so an external module can use it with its own

picto
This commit is contained in:
Laurent Destailleur 2013-03-10 13:23:55 +01:00
parent 38184b7c72
commit dbba8fd6ba

View File

@ -562,29 +562,31 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename='
/**
* Show tab header of a card
*
* @param array $links Array of tabs
* @param string $active Active tab name (document', 'info', 'ldap', ....)
* @param string $title Title
* @param int $notab 0=Add tab header, 1=no tab header
* @param string $picto Add a picto on tab title
* @param array $links Array of tabs
* @param string $active Active tab name (document', 'info', 'ldap', ....)
* @param string $title Title
* @param int $notab 0=Add tab header, 1=no tab header
* @param string $picto Add a picto on tab title
* @param int $pictoisfullpath If 1, image path is a full path. If you set this to 1, you can use url returned by dol_build_path('/mymodyle/img/myimg.png',1) for $picto.
* @return void
*/
function dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto='')
function dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto='', $pictoisfullpath=0)
{
print dol_get_fiche_head($links, $active, $title, $notab, $picto);
print dol_get_fiche_head($links, $active, $title, $notab, $picto, $pictoisfullpath);
}
/**
* Show tab header of a card
*
* @param array $links Array of tabs
* @param int $active Active tab name
* @param string $title Title
* @param int $notab 0=Add tab header, 1=no tab header
* @param string $picto Add a picto on tab title
* @param array $links Array of tabs
* @param int $active Active tab name
* @param string $title Title
* @param int $notab 0=Add tab header, 1=no tab header
* @param string $picto Add a picto on tab title
* @param int $pictoisfullpath If 1, image path is a full path. If you set this to 1, you can use url returned by dol_build_path('/mymodyle/img/myimg.png',1) for $picto.
* @return void
*/
function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto='')
function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto='', $pictoisfullpath=0)
{
$out="\n".'<div class="tabs">'."\n";
@ -593,7 +595,7 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p
{
$limittitle=30;
$out.='<a class="tabTitle">';
if ($picto) $out.=img_object('',$picto).' ';
if ($picto) $out.=img_picto('',($pictoisfullpath?'':'object_').$picto,'',$pictoisfullpath).' ';
$out.=dol_trunc($title,$limittitle);
$out.='</a>';
}