Adding Hook for tooltip on project

This commit is contained in:
BENKE Charlene 2017-07-06 15:48:22 +02:00 committed by GitHub
parent 09e9255ff1
commit 3a89591fb4

View File

@ -991,7 +991,7 @@ class Project extends CommonObject
} }
$linkclose=''; $linkclose='';
if (empty($notooltip) && $user->rights->propal->lire) if (empty($notooltip))
{ {
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{ {
@ -1000,6 +1000,17 @@ class Project extends CommonObject
} }
$linkclose.=' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose.=' title="'.dol_escape_htmltag($label, 1).'"';
$linkclose.=' class="classfortooltip"'; $linkclose.=' class="classfortooltip"';
if (! is_object($hookmanager)) {
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
$hookmanager=new HookManager($this->db);
}
$hookmanager->initHooks(array('projectdao'));
$parameters=array('id'=>$this->id);
// Note that $action and $object may have been modified by some hooks
$reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action);
if ($reshook > 0)
$linkclose = $hookmanager->resPrint;
} }
$picto = 'projectpub'; $picto = 'projectpub';