Some indenting and hookmanager feature
This commit is contained in:
parent
427a8c5bf4
commit
093f1da206
@ -1096,7 +1096,7 @@ class ActionComm extends CommonObject
|
||||
*/
|
||||
function getNomUrl($withpicto=0,$maxlength=0,$classname='',$option='',$overwritepicto=0)
|
||||
{
|
||||
global $conf,$langs;
|
||||
global $conf,$langs, $hookmanager;
|
||||
|
||||
$result='';
|
||||
$tooltip = '<u>' . $langs->trans('ShowAction'.$objp->code) . '</u>';
|
||||
@ -1109,9 +1109,21 @@ class ActionComm extends CommonObject
|
||||
if (! empty($this->location))
|
||||
$tooltip .= '<br><b>' . $langs->trans('Location') . ':</b> ' . $this->location;
|
||||
|
||||
$linkclose = '" title="'.dol_escape_htmltag($tooltip, 1).'">';
|
||||
if ($option=='birthday') $link = '<a class="'.$classname.' classfortooltip" href="'.DOL_URL_ROOT.'/contact/perso.php?id='.$this->id.$linkclose;
|
||||
else $link = '<a class="'.$classname.' classfortooltip" href="'.DOL_URL_ROOT.'/comm/action/card.php?id='.$this->id.$linkclose;
|
||||
$linkclose = ' class="'.$classname.' classfortooltip" title="'.dol_escape_htmltag($tooltip, 1).'">';
|
||||
if (! is_object($hookmanager))
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||
$hookmanager=new HookManager($this->db);
|
||||
}
|
||||
$hookmanager->initHooks(array('actiondao'));
|
||||
$parameters=array('id'=>$this->id);
|
||||
$reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
$linkclose = ($hookmanager->resPrint ? $hookmanager->resPrint : $linkclose);
|
||||
|
||||
if ($option=='birthday')
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/contact/perso.php?id='.$this->id.'"'.$linkclose;
|
||||
else
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/comm/action/card.php?id='.$this->id.'"'.$linkclose;
|
||||
$linkend='</a>';
|
||||
//print 'rrr'.$this->libelle.'-'.$withpicto;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user