diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 6074f6fe841..8a2ac9d8dd0 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -702,8 +702,9 @@ function dol_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) { - global $conf,$langs; - + global $conf,$langs, $hookmanager;; + + $tabsname=str_replace ("@","",$picto); $out="\n".'
'."\n"; // Show title @@ -731,7 +732,8 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p // if =0 we don't use the feature $limittoshow=(empty($conf->global->MAIN_MAXTABS_IN_CARD)?99:$conf->global->MAIN_MAXTABS_IN_CARD); $displaytab=0; - + $nbintab=0; + for ($i = 0 ; $i <= $maxkey ; $i++) { if ((is_numeric($active) && $i == $active) || (! empty($links[$i][2]) && ! is_numeric($active) && $active == $links[$i][2])) @@ -746,6 +748,8 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p if ($i <= $limittoshow || $isactive ) { + if ($isactive) $hookmanager->initHooks(array($tabsname."-".$links[$i][2]. '-tabs')); + $out.='
'; if (isset($links[$i][2]) && $links[$i][2] == 'image') { @@ -787,6 +791,7 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p $outmore.=''.$links[$i][1].''."\n"; $outmore.='
'; + $nbintab++; } $displaytab=$i; } @@ -795,7 +800,7 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p { $tabsname=str_replace("@", "", $picto); $out.='
'; - $out.=''.$langs->trans("More").'...'; + $out.=''.$langs->trans("More").' '.$nbintab.'.''; $out.='
'.$outmore.'
'; $out.="
\n"; @@ -809,6 +814,9 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p if (! $notab) $out.="\n".'
'."\n"; + $parameters=array(); + $reshook=$hookmanager->executeHooks('printTabsHead',$parameters); // Note that $action and $object may have been modified by some hooks + return $out; } @@ -4898,7 +4906,7 @@ function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode= */ function printCommonFooter($zone='private') { - global $conf; + global $conf, $hookmanager; global $micro_start_time; if ($zone == 'private') print "\n".''."\n"; @@ -4976,6 +4984,9 @@ function printCommonFooter($zone='private') print "End of log output -->\n"; } + $parameters=array(); + $reshook=$hookmanager->executeHooks('printCommonFooter',$parameters); // Note that $action and $object may have been modified by some hooks + } /**