From 0f43ba6728220602dd4bc81267dceb847dfb7a3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 17 Sep 2024 11:18:56 +0200 Subject: [PATCH 01/17] Update ecmfiles.class.php --- htdocs/ecm/class/ecmfiles.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index 6a105f6cf5b86..2dab743186be4 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -5,7 +5,7 @@ * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2018 Francis Appels * Copyright (C) 2019-2024 Frédéric France - * Copyright (C) 2024 MDW + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -934,7 +934,7 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen $linkclose = ''; if (empty($notooltip)) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { - $label = $langs->trans("ShowProject"); + $label = $langs->trans("ShowFile"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; @@ -953,7 +953,7 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen $result .= ' '; } } - $result .= $linkstart.$this->ref.$linkend; + $result .= $linkstart.$this->filename.$linkend; global $action; $hookmanager->initHooks(array($this->element . 'dao')); From 26919d6b06b67f87063ba740cd1fddb2947e4e9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 17 Sep 2024 11:21:55 +0200 Subject: [PATCH 02/17] Update ecm.lang --- htdocs/langs/en_US/ecm.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/ecm.lang b/htdocs/langs/en_US/ecm.lang index 14b8229687c4b..f0d7974890f5f 100644 --- a/htdocs/langs/en_US/ecm.lang +++ b/htdocs/langs/en_US/ecm.lang @@ -54,3 +54,4 @@ SucessConvertImgWebp=Images successfully duplicated SucessConvertChosenImgWebp=Chosen image successfully duplicated ECMDirName=Dir name ECMParentDirectory=Parent directory +ShowFile=Show file From a284beda7badcc551ff5786464af940c89573f5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 17 Sep 2024 11:53:18 +0200 Subject: [PATCH 03/17] Update ecmfiles.class.php --- htdocs/ecm/class/ecmfiles.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index 2dab743186be4..5b9bfb43480a3 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -907,7 +907,7 @@ public function updateAfterRename($olddir, $newdir) * Return a link to the object card (with optionally the picto) * * @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto) - * @param string $option On what the link point to + * @param string $option On what the link point to (propal, etc) module name * @param int $notooltip 1=Disable tooltip * @param int $maxlen Max length of visible user name * @param string $morecss Add more css on link @@ -929,7 +929,11 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen $label .= '
'; $label .= ''.$langs->trans('Ref').': '.$this->ref; - $url = DOL_URL_ROOT.'/ecm/file_card.php?id='.$this->id; + if ($option) { + $url = DOL_URL_ROOT.'/document.php?modulepart='.$option.'&file='.urlencode(preg_replace('/[a-zA-Z]+\//', '', $this->filepath).'/'.$this->filename).'&entity='.$this->entity; + } else { + $url = DOL_URL_ROOT.'/ecm/file_card.php?id='.$this->id; + } $linkclose = ''; if (empty($notooltip)) { From 711f027140a11fa05110d9611ddd2f3bbba18dd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 24 Sep 2024 13:42:44 +0200 Subject: [PATCH 04/17] add translations --- dev/translation/ignore_translation_keys.lst | 1 + htdocs/ecm/class/ecmfiles.class.php | 4 ++++ htdocs/langs/en_US/ecm.lang | 2 ++ 3 files changed, 7 insertions(+) diff --git a/dev/translation/ignore_translation_keys.lst b/dev/translation/ignore_translation_keys.lst index 46124cff57e09..08cdccb760f41 100644 --- a/dev/translation/ignore_translation_keys.lst +++ b/dev/translation/ignore_translation_keys.lst @@ -443,6 +443,7 @@ Free FreeLegalTextOnReceptions FrequencyPer_ FromPublicEmail +FullPathOrig Function_getNextValue_InModuleNotWorking Gantt GeneratePDF diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index 5b9bfb43480a3..1b4d89a7e312c 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -928,6 +928,9 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen $label = ''.$langs->trans("File").''; $label .= '
'; $label .= ''.$langs->trans('Ref').': '.$this->ref; + if (!empty($this->gen_or_uploaded)) { + $label .= '
'.$langs->trans('GenOrUpload').': '.$this->gen_or_uploaded; + } if ($option) { $url = DOL_URL_ROOT.'/document.php?modulepart='.$option.'&file='.urlencode(preg_replace('/[a-zA-Z]+\//', '', $this->filepath).'/'.$this->filename).'&entity='.$this->entity; @@ -968,6 +971,7 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen } else { $result .= $hookmanager->resPrint; } + return $result; } diff --git a/htdocs/langs/en_US/ecm.lang b/htdocs/langs/en_US/ecm.lang index f0d7974890f5f..3e87f385577ad 100644 --- a/htdocs/langs/en_US/ecm.lang +++ b/htdocs/langs/en_US/ecm.lang @@ -55,3 +55,5 @@ SucessConvertChosenImgWebp=Chosen image successfully duplicated ECMDirName=Dir name ECMParentDirectory=Parent directory ShowFile=Show file +FullPathOrig=Full path origin +GenOrUpload=File origin From 19a470a6253627cfb5dd6606d01e12132db4918c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 24 Sep 2024 18:28:49 +0200 Subject: [PATCH 05/17] wip --- htdocs/ecm/class/ecmfiles.class.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index 1b4d89a7e312c..447a6ac8de991 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -915,9 +915,7 @@ public function updateAfterRename($olddir, $newdir) */ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '') { - global $db, $conf, $langs; - global $dolibarr_main_authentication, $dolibarr_main_demo; - global $menumanager, $hookmanager; + global $conf, $hookmanager, $langs; if (!empty($conf->dol_no_mouse_hover)) { $notooltip = 1; // Force disable tooltips From 4770446caf71633d571502e06aa44cb55c4498a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 25 Sep 2024 18:28:57 +0200 Subject: [PATCH 06/17] wip --- htdocs/ecm/class/ecmfiles.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index 447a6ac8de991..190991628ceea 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -923,7 +923,7 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen $result = ''; - $label = ''.$langs->trans("File").''; + $label = ''.$langs->trans("ShowFile").''; $label .= '
'; $label .= ''.$langs->trans('Ref').': '.$this->ref; if (!empty($this->gen_or_uploaded)) { From 225c9eafb41a8f38b4d7e642646dee60f4dc92a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 7 Oct 2024 14:20:13 +0200 Subject: [PATCH 07/17] enhance tooltip --- htdocs/core/class/html.formfile.class.php | 34 +++++++++++++---------- htdocs/ecm/class/ecmfiles.class.php | 27 +++++++++++++++++- 2 files changed, 45 insertions(+), 16 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index a2a60e24fe86a..c9a77642b5e53 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -874,6 +874,9 @@ public function showdocuments($modulepart, $modulesubdir, $filedir, $urlsource, } foreach ($file_list as $file) { + require_once DOL_DOCUMENT_ROOT . '/ecm/class/ecmfiles.class.php'; + $ecmfile = new EcmFiles($this->db); + $ecmfile->fetch($file['rowid']); // Define relative path for download link (depends on module) $relativepath = $file["name"]; // Cas general if ($modulesubdir) { @@ -899,21 +902,22 @@ public function showdocuments($modulepart, $modulesubdir, $filedir, $urlsource, } else { $out .= ''; } - $out .= 'trans("File").': '.$file["name"]); - $out .= dol_trunc($file["name"], 150); - $out .= ''; + // $out .= 'trans("File").': '.$file["name"]); + // $out .= dol_trunc($file["name"], 150); + // $out .= ''; + $out .= $ecmfile->getNomUrl(1, $modulepart); $out .= ''."\n"; $out .= $imgpreview; $out .= ''; diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index 190991628ceea..f4ba1e23bfae9 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -903,6 +903,27 @@ public function updateAfterRename($olddir, $newdir) $this->db->query($sql); } + /** + * getTooltipContentArray + * @param array $params params to construct tooltip data + * @since v18 + * @return array{picto?:string,ref?:string,label?:string}|array{optimize:string} + */ + public function getTooltipContentArray($params) + { + global $conf, $langs, $user; + + $langs->load('ecm'); + $datas = []; + $nofetch = !empty($params['nofetch']); + + if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { + return ['optimize' => $langs->trans("ShowFile")]; + } + + return $datas; + } + /** * Return a link to the object card (with optionally the picto) * @@ -953,7 +974,11 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen $linkend = ''; if ($withpicto) { - $result .= ($linkstart.img_object(($notooltip ? '' : $label), 'label', ($notooltip ? '' : 'class="classfortooltip"')).$linkend); + if (empty($this->filename)) { + $result .= ($linkstart.img_object(($notooltip ? '' : $label), 'label', ($notooltip ? '' : 'class="classfortooltip"')).$linkend); + } else { + $result .= ($linkstart.img_mime($this->filename, ($notooltip ? '' : $label), ($notooltip ? '' : 'class="classfortooltip"')).$linkend); + } if ($withpicto != 2) { $result .= ' '; } From 22bbf79d0c38467f92c2c10c4a25d6af203471f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 7 Oct 2024 14:31:33 +0200 Subject: [PATCH 08/17] fix --- htdocs/ecm/class/ecmfiles.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index f4ba1e23bfae9..5daa111aee659 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -969,7 +969,10 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); } - $linkstart = ''; $linkend = ''; From 774cea668c499da3dce4a2838a883b11d9ee2cc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 7 Oct 2024 14:39:33 +0200 Subject: [PATCH 09/17] fix --- htdocs/ecm/class/ecmfiles.class.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index 5daa111aee659..379c19452e837 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -906,8 +906,8 @@ public function updateAfterRename($olddir, $newdir) /** * getTooltipContentArray * @param array $params params to construct tooltip data - * @since v18 - * @return array{picto?:string,ref?:string,label?:string}|array{optimize:string} + * @since v21 + * @return array{picto?:string,ref?:string,gen_or_upload?:string}|array{optimize:string} */ public function getTooltipContentArray($params) { @@ -920,6 +920,13 @@ public function getTooltipContentArray($params) if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { return ['optimize' => $langs->trans("ShowFile")]; } + $datas['picto'] = ''.$langs->trans("ShowFile").''; + if (!empty($this->ref)) { + $datas['ref'] = '
'.$langs->trans('Ref').': '.$this->ref; + } + if (!empty($this->gen_or_uploaded)) { + $datas['gen_or_upload'] .= '
'.$langs->trans('GenOrUpload').': '.$this->gen_or_uploaded; + } return $datas; } From be1840a9d61b2d6531c8fac809a6aa65c02aa5f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 7 Oct 2024 14:41:54 +0200 Subject: [PATCH 10/17] fix --- htdocs/ecm/class/ecmfiles.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index 379c19452e837..f36f697146a83 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -952,8 +952,7 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen $result = ''; $label = ''.$langs->trans("ShowFile").''; - $label .= '
'; - $label .= ''.$langs->trans('Ref').': '.$this->ref; + $label .= '
'.$langs->trans('Ref').': '.$this->ref; if (!empty($this->gen_or_uploaded)) { $label .= '
'.$langs->trans('GenOrUpload').': '.$this->gen_or_uploaded; } From 7cf27f1346282fafe6f681a10c5741e1094a55f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 7 Oct 2024 18:37:35 +0200 Subject: [PATCH 11/17] fix ajaxtooltip --- htdocs/core/class/html.formfile.class.php | 2 +- htdocs/core/lib/functions.lib.php | 7 ++++++ htdocs/ecm/class/ecmfiles.class.php | 28 +++++++++++++++-------- 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index c9a77642b5e53..f62ab1708581e 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -917,7 +917,7 @@ public function showdocuments($modulepart, $modulesubdir, $filedir, $urlsource, // $out .= img_mime($file["name"], $langs->trans("File").': '.$file["name"]); // $out .= dol_trunc($file["name"], 150); // $out .= ''; - $out .= $ecmfile->getNomUrl(1, $modulepart); + $out .= $ecmfile->getNomUrl(1, $modulepart, 0, 0, ' documentdownload'); $out .= ''."\n"; $out .= $imgpreview; $out .= ''; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index f0c1d6c19aa4a..813384447d28a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -13053,6 +13053,13 @@ function getElementProperties($elementType) $classname = 'Ccountry'; $table_element = 'c_country'; $subelement = ''; + } elseif ($elementType == 'ecmfiles') { + $module = 'ecm'; + $classpath = 'ecm/class'; + $classfile = 'ecmfiles'; + $classname = 'Ecmfiles'; + $table_element = 'ecmfiles'; + $subelement = ''; } elseif ($elementType == 'knowledgerecord') { $module = ''; $classpath = 'knowledgemanagement/class'; diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index f36f697146a83..5cae28c452e09 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -951,10 +951,20 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen $result = ''; - $label = ''.$langs->trans("ShowFile").''; - $label .= '
'.$langs->trans('Ref').': '.$this->ref; - if (!empty($this->gen_or_uploaded)) { - $label .= '
'.$langs->trans('GenOrUpload').': '.$this->gen_or_uploaded; + $params = [ + 'id' => $this->id, + 'objecttype' => $this->element, + 'option' => $option, + 'nofetch' => 1, + ]; + $classfortooltip = 'classfortooltip'; + $dataparams = ''; + if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) { + $classfortooltip = 'classforajaxtooltip'; + $dataparams = ' data-params="'.dol_escape_htmltag(json_encode($params)).'"'; + $label = ''; + } else { + $label = implode($this->getTooltipContentArray($params)); } if ($option) { @@ -969,13 +979,13 @@ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen $label = $langs->trans("ShowFile"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; - $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; + $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); + $linkclose .= $dataparams.' class="'.$classfortooltip.' '.($morecss ? ' '.$morecss : '').'"'; } else { $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); } - $linkstart = 'filename)) { - $result .= ($linkstart.img_object(($notooltip ? '' : $label), 'label', ($notooltip ? '' : 'class="classfortooltip"')).$linkend); + $result .= ($linkstart.img_object(($notooltip ? '' : $label), 'label', ($notooltip ? '' : 'class="paddingright"')).$linkend); } else { - $result .= ($linkstart.img_mime($this->filename, ($notooltip ? '' : $label), ($notooltip ? '' : 'class="classfortooltip"')).$linkend); + $result .= ($linkstart.img_mime($this->filename, ($notooltip ? '' : $label), ($notooltip ? '' : 'class="paddingright"')).$linkend); } if ($withpicto != 2) { $result .= ' '; From 5e18cb3ebceaa5e13f64294c67055d2180bb5081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 12 Oct 2024 09:53:45 +0200 Subject: [PATCH 12/17] fix picto --- htdocs/commande/class/commande.class.php | 2 +- htdocs/ecm/class/ecmfiles.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 369b784417277..f4000de23bb6c 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3788,7 +3788,7 @@ public function getTooltipContentArray($params) } if ($user->hasRight('commande', 'lire')) { - $datas['picto'] = img_picto('', $this->picto).' '.$langs->trans("Order").''; + $datas['picto'] = img_picto('', $this->picto, '', 0, 0, 0, '', 'paddingrightonly').' '.$langs->trans("Order").''; if (isset($this->statut)) { $datas['status'] = ' '.$this->getLibStatut(5); } diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index 5cae28c452e09..1028c0f692708 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -920,7 +920,7 @@ public function getTooltipContentArray($params) if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { return ['optimize' => $langs->trans("ShowFile")]; } - $datas['picto'] = ''.$langs->trans("ShowFile").''; + $datas['picto'] = img_picto('', $this->picto, '', 0, 0, 0, '', 'paddingrightonly') . '' . $langs->trans("ShowFile") . ''; if (!empty($this->ref)) { $datas['ref'] = '
'.$langs->trans('Ref').': '.$this->ref; } From 095efc438261e492a38e3485ac6988e2758a219a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 12 Oct 2024 09:57:55 +0200 Subject: [PATCH 13/17] fix picto --- htdocs/comm/propal/class/propal.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 5cf2c238a3310..dbae2a76393fc 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -3718,7 +3718,7 @@ public function getTooltipContentArray($params) return ['optimize' => $langs->trans("Proposal")]; } if ($user->hasRight('propal', 'lire')) { - $datas['picto'] = img_picto('', $this->picto).' '.$langs->trans("Proposal").''; + $datas['picto'] = img_picto('', $this->picto, '', 0, 0, 0, '', 'paddingrightonly').''.$langs->trans("Proposal").''; if (isset($this->status)) { $datas['status'] = ' '.$this->getLibStatut(5); } From f9078cb926f4e40c57eae50afd92fc306496231c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 12 Oct 2024 09:59:53 +0200 Subject: [PATCH 14/17] fix sql --- .../tables/llx_webhook_target-webhook.sql | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/htdocs/install/mysql/tables/llx_webhook_target-webhook.sql b/htdocs/install/mysql/tables/llx_webhook_target-webhook.sql index 54fdc2d20795d..1d3a383dd4921 100644 --- a/htdocs/install/mysql/tables/llx_webhook_target-webhook.sql +++ b/htdocs/install/mysql/tables/llx_webhook_target-webhook.sql @@ -16,22 +16,22 @@ CREATE TABLE llx_webhook_target( -- BEGIN MODULEBUILDER FIELDS - rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, - ref varchar(128) NOT NULL, - label varchar(255), - description text, - note_public text, - note_private text, - date_creation datetime NOT NULL, - tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - fk_user_creat integer NOT NULL, - fk_user_modif integer, + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + ref varchar(128) NOT NULL, + label varchar(255), + description text, + note_public text, + note_private text, + date_creation datetime NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_user_creat integer NOT NULL, + fk_user_modif integer, import_key varchar(14), - status integer DEFAULT 0 NOT NULL, + status integer DEFAULT 0 NOT NULL, url varchar(255) NOT NULL, connection_method varchar(255) NULL, -- to store the way to authenticate to the webhook connection_data varchar(255) NULL, -- to store the data to use to authenticate to the webhook - trigger_codes text NULL -- list of selected trigger that must call the webhook - trigger_stack text, -- json object to store trigger to be send manually + trigger_codes text NULL, -- list of selected trigger that must call the webhook + trigger_stack text -- json object to store trigger to be send manually -- END MODULEBUILDER FIELDS ) ENGINE=innodb; From c083ac10975d728467d35a2a363c6ab52a74baba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 13 Oct 2024 08:52:48 +0200 Subject: [PATCH 15/17] tooltip --- htdocs/commande/class/commande.class.php | 2 +- htdocs/ecm/class/ecmdirectory.class.php | 2 +- htdocs/install/mysql/tables/llx_webhook_target-webhook.sql | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index f4000de23bb6c..5a36343e6174c 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3788,7 +3788,7 @@ public function getTooltipContentArray($params) } if ($user->hasRight('commande', 'lire')) { - $datas['picto'] = img_picto('', $this->picto, '', 0, 0, 0, '', 'paddingrightonly').' '.$langs->trans("Order").''; + $datas['picto'] = img_picto('', $this->picto, '', 0, 0, 0, '', 'paddingrightonly').''.$langs->trans("Order").''; if (isset($this->statut)) { $datas['status'] = ' '.$this->getLibStatut(5); } diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 940fb8ff905fb..99fc638cc10dc 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -483,7 +483,7 @@ public function getNomUrl($withpicto = 0, $option = '', $max = 0, $more = '', $n $result = ''; //$newref=str_replace('_',' ',$this->ref); $newref = $this->ref; - $label = $langs->trans("ShowECMSection").': '.$newref; + $label = img_picto('', $this->picto, '', 0, 0, 0, '', 'paddingrightonly') . $langs->trans("ShowECMSection") . ': ' . $newref; $linkclose = '"'.($more ? ' '.$more : '').' title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">'; $linkstart = '
Date: Sun, 13 Oct 2024 11:12:42 +0200 Subject: [PATCH 17/17] test --- htdocs/ecm/class/ecmdirectory.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 9a958e65e2e29..93d5cbc6ffe6e 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -1,8 +1,8 @@ - * Copyright (C) 2008-2012 Regis Houssin - * Copyright (C) 2024 Frédéric France - * Copyright (C) 2024 MDW +/* Copyright (C) 2007-2012 Laurent Destailleur + * Copyright (C) 2008-2012 Regis Houssin + * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by