|
@@ -1346,14 +1346,18 @@ class Holiday extends CommonObject
|
|
|
* @param int $withpicto 0=_No picto, 1=Includes the picto in the linkn, 2=Picto only
|
|
|
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
|
|
* @param int $notooltip 1=Disable tooltip
|
|
|
+ * @param string $morecss Add more css on link
|
|
|
* @return string String with URL
|
|
|
*/
|
|
|
- public function getNomUrl($withpicto = 0, $save_lastsearch_value = -1, $notooltip = 0)
|
|
|
+ public function getNomUrl($withpicto = 0, $save_lastsearch_value = -1, $notooltip = 0, $morecss = '')
|
|
|
{
|
|
|
- global $langs, $hookmanager;
|
|
|
+ global $conf, $langs, $hookmanager;
|
|
|
|
|
|
- $result = '';
|
|
|
+ if (!empty($conf->dol_no_mouse_hover)) {
|
|
|
+ $notooltip = 1; // Force disable tooltips
|
|
|
+ }
|
|
|
|
|
|
+ $result = '';
|
|
|
$params = [
|
|
|
'id' => $this->id,
|
|
|
'objecttype' => $this->element,
|
|
@@ -1382,19 +1386,33 @@ class Holiday extends CommonObject
|
|
|
$url .= '&save_lastsearch_values=1';
|
|
|
}
|
|
|
//}
|
|
|
+
|
|
|
+ $linkclose = '';
|
|
|
+ if (empty($notooltip)) {
|
|
|
+ if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) {
|
|
|
+ $label = $langs->trans("ShowMyObject");
|
|
|
+ $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
|
|
|
+ }
|
|
|
+ $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');
|
|
|
+ $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"';
|
|
|
+ } else {
|
|
|
+ $linkclose = ($morecss ? ' class="'.$morecss.'"' : '');
|
|
|
+ }
|
|
|
+
|
|
|
$linkstart = '<a href="'.$url.'"';
|
|
|
- $linkstart .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');
|
|
|
- $linkstart .= $dataparams.' class="'.$classfortooltip.'">';
|
|
|
+ $linkstart .= $linkclose.'>';
|
|
|
$linkend = '</a>';
|
|
|
|
|
|
$result .= $linkstart;
|
|
|
+
|
|
|
if ($withpicto) {
|
|
|
- $result .= img_object(($notooltip ? '' : $label), $this->picto, ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : $dataparams.' class="'.(($withpicto != 2) ? 'paddingright ' : '').$classfortooltip.'"'), 0, 0, $notooltip ? 0 : 1);
|
|
|
+ $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'"'), 0, 0, $notooltip ? 0 : 1);
|
|
|
}
|
|
|
if ($withpicto != 2) {
|
|
|
$result .= $this->ref;
|
|
|
}
|
|
|
$result .= $linkend;
|
|
|
+
|
|
|
global $action;
|
|
|
$hookmanager->initHooks(array($this->element . 'dao'));
|
|
|
$parameters = array('id'=>$this->id, 'getnomurl' => &$result);
|