mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Fix linkg to public notes
This commit is contained in:
@@ -3559,9 +3559,10 @@ class Commande extends CommonOrder
|
||||
* @param int $short ???
|
||||
* @param int $notooltip 1=Disable tooltip
|
||||
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||
* @param int $addlinktonotes Add linkt to notes
|
||||
* @return string String with URL
|
||||
*/
|
||||
public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $notooltip = 0, $save_lastsearch_value = -1)
|
||||
public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $notooltip = 0, $save_lastsearch_value = -1, $addlinktonotes = 0)
|
||||
{
|
||||
global $conf, $langs, $user;
|
||||
|
||||
@@ -3628,6 +3629,22 @@ class Commande extends CommonOrder
|
||||
if ($withpicto != 2) $result .= $this->ref;
|
||||
$result .= $linkend;
|
||||
|
||||
if ($addlinktonotes)
|
||||
{
|
||||
$txttoshow = ($user->socid > 0 ? $this->note_public : $this->note_private);
|
||||
if ($txttoshow)
|
||||
{
|
||||
$notetoshow = $langs->trans("ViewPrivateNote").':<br>'.dol_string_nohtmltag($txttoshow, 1);
|
||||
$result .= ' <span class="note inline-block">';
|
||||
$result .= '<a href="'.DOL_URL_ROOT.'/commande/note.php?id='.$this->id.'" class="classfortooltip" title="'.dol_escape_htmltag($notetoshow).'">';
|
||||
$result .= img_picto('', 'note');
|
||||
$result .= '</a>';
|
||||
//$result.=img_picto($langs->trans("ViewNote"),'object_generic');
|
||||
//$result.='</a>';
|
||||
$result .= '</span>';
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user