diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 18b47b7102a..bd5b39f717b 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -114,17 +114,17 @@ $fieldstosearchall = array( if (empty($user->socid)) $fieldstosearchall["c.note_private"] = "NotePrivate"; $arrayfields = array( - 'c.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), - 'c.ref_customer'=>array('label'=>$langs->trans("RefCustomer"), 'checked'=>1), - 'c.ref_supplier'=>array('label'=>$langs->trans("RefSupplier"), 'checked'=>1), - 's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1), - 's.email'=>array('label'=>$langs->trans("ThirdPartyEmail"), 'checked'=>0), - 's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>0), - 's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>0), - 'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0), - 'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0), - 'sale_representative'=>array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>1), - 'c.date_contrat'=>array('label'=>$langs->trans("DateContract"), 'checked'=>1), + 'c.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1, 'position'=>10), + 'c.ref_customer'=>array('label'=>$langs->trans("RefCustomer"), 'checked'=>1, 'position'=>12), + 'c.ref_supplier'=>array('label'=>$langs->trans("RefSupplier"), 'checked'=>1, 'position'=>14), + 's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'position'=>30), + 's.email'=>array('label'=>$langs->trans("ThirdPartyEmail"), 'checked'=>0, 'position'=>30), + 's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>0, 'position'=>31), + 's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>0, 'position'=>32), + 'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0, 'position'=>33), + 'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0, 'position'=>34), + 'sale_representative'=>array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>1, 'position'=>80), + 'c.date_contrat'=>array('label'=>$langs->trans("DateContract"), 'checked'=>1, 'position'=>45), 'c.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), 'c.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), 'lower_planned_end_date'=>array('label'=>$langs->trans("LowerDateEndPlannedShort"), 'checked'=>1, 'position'=>900, 'help'=>$langs->trans("LowerDateEndPlannedShort")), diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index ab3a6dc45a8..41d0ed9362e 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4282,7 +4282,11 @@ function getTitleFieldOfList($name, $thead = 0, $file = "", $field = "", $begin $out .= '>'; } - if ($tooltip) $out .= $form->textwithpicto($langs->trans($name), $langs->trans($tooltip)); + if ($tooltip) { + // You can also use 'TranslationString:keyfortooltiponlick' for a tooltip on click. + $tmptooltip = explode(':', $tooltip); + $out .= $form->textwithpicto($langs->trans($name), $langs->trans($tmptooltip[0]), 1, 'help', '', 0, 3, (empty($tmptooltip[1]) ? '' : 'extra_'.str_replace('.', '_', $field).'_'.$tmptooltip[1])); + } else $out .= $langs->trans($name); if (empty($thead) && $field && empty($disablesortlink)) // If this is a sort field diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index bc02e490c34..9db0ae13824 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -128,8 +128,13 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] print '