Browse Source

Merge pull request #2517 from frederic34/patch-12

Closes #2509  Bug: Ref is not shown in the bubble that appears when the mouse is over an agenda link
Juanjo Menent 10 years ago
parent
commit
4588b2bb4c
1 changed files with 7 additions and 4 deletions
  1. 7 4
      htdocs/comm/action/class/actioncomm.class.php

+ 7 - 4
htdocs/comm/action/class/actioncomm.class.php

@@ -973,12 +973,15 @@ class ActionComm extends CommonObject
 
         $result='';
         $tooltip = '<u>' . $langs->trans('ShowAction'.$objp->code) . '</u>';
-        $tooltip .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->label;
+        if (! empty($this->ref))
+            $tooltip .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
+        if (! empty($this->label))
+            $tooltip .= '<br><b>' . $langs->trans('Title') . ':</b> ' . $this->label;
         $label = $this->label;
         if (empty($label)) $label=$this->libelle;   // For backward compatibility
-        $linkclose = '" title="'.dol_escape_htmltag($tooltip, 1).'" class="classfortooltip">';
-        if ($option=='birthday') $link = '<a '.($classname?'class="'.$classname.'" ':'').'href="'.DOL_URL_ROOT.'/contact/perso.php?id='.$this->id.$linkclose;
-        else $link = '<a '.($classname?'class="'.$classname.'" ':'').'href="'.DOL_URL_ROOT.'/comm/action/card.php?id='.$this->id.$linkclose;
+        $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;
         $linkend='</a>';
         //print 'rrr'.$this->libelle.'-'.$withpicto;