diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php
index 00cbfc4158a..bb3f2ae035d 100644
--- a/htdocs/contact/class/contact.class.php
+++ b/htdocs/contact/class/contact.class.php
@@ -1389,7 +1389,7 @@ class Contact extends CommonObject
* Return name of contact with link (and eventually picto)
* Use $this->id, $this->lastname, $this->firstname, this->civility_id
*
- * @param int $withpicto Include picto with link
+ * @param int $withpicto Include picto with link (1=picto + name, 2=picto only, -1=photo+name, -2=photo only)
* @param string $option Where the link point to
* @param int $maxlen Max length of
* @param string $moreparam Add more param into URL
@@ -1475,14 +1475,14 @@ class Contact extends CommonObject
$result .= $linkstart;
if ($withpicto) {
- if ($withpicto == -2) {
+ if ($withpicto < 0) {
$result .= ''.Form::showphoto('contact', $this, 0, 0, 0, 'userphoto'.($withpicto == -3 ? 'small' : ''), 'mini', 0, 1).'';
} else {
$result .= img_object(($notooltip ? '' : $label), ( $this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
}
}
if ($withpicto != 2 && $withpicto != -2) {
- $result .= ($maxlen ?dol_trunc($this->getFullName($langs), $maxlen) : $this->getFullName($langs));
+ $result .= ''.($maxlen ? dol_trunc($this->getFullName($langs), $maxlen) : $this->getFullName($langs)).'';
}
$result .= $linkend;
diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php
index f5502426b00..457d310492c 100644
--- a/htdocs/core/class/html.formactions.class.php
+++ b/htdocs/core/class/html.formactions.class.php
@@ -359,7 +359,7 @@ class FormActions
* @param string $morecss More css to add to SELECT component.
* @return string
*/
- public function select_type_actions($selected = '', $htmlname = 'actioncode', $excludetype = '', $onlyautoornot = 0, $hideinfohelp = 0, $multiselect = 0, $nooutput = 0, $morecss = '')
+ public function select_type_actions($selected = '', $htmlname = 'actioncode', $excludetype = '', $onlyautoornot = 0, $hideinfohelp = 0, $multiselect = 0, $nooutput = 0, $morecss = 'minwidth300')
{
// phpcs:enable
global $langs, $user, $form, $conf;
@@ -399,7 +399,7 @@ class FormActions
}
$out .= $form->multiselectarray($htmlname, $arraylist, $selected, 0, 0, 'centpercent', 0, 0);
} else {
- $out .= $form->selectarray($htmlname, $arraylist, $selected, 0, 0, 0, '', 0, 0, 0, '', 'minwidth300'.($morecss ? ' '.$morecss : ''), 1);
+ $out .= $form->selectarray($htmlname, $arraylist, $selected, 0, 0, 0, '', 0, 0, 0, '', $morecss, 1);
}
if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0) {
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index 2902430bf82..5ffce5748fe 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -1710,7 +1710,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
$out .= '
| ';
$out .= ' | ';
$out .= '';
- $out .= $formactions->select_type_actions($actioncode, "actioncode", '', empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1, 0, (empty($conf->global->AGENDA_USE_MULTISELECT_TYPE) ? 0 : 1), 1);
+ $out .= $formactions->select_type_actions($actioncode, "actioncode", '', empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1, 0, (empty($conf->global->AGENDA_USE_MULTISELECT_TYPE) ? 0 : 1), 1, 'minwidth200');
$out .= ' | ';
$out .= ' | ';
$out .= '';
@@ -1741,14 +1741,14 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
}
$out .= getTitleFieldOfList($tmp);
}
- $out .= getTitleFieldOfList($langs->trans("Ref"), 0, $_SERVER["PHP_SELF"], 'a.id', '', $param, '', $sortfield, $sortorder);
- $out .= getTitleFieldOfList($langs->trans("Owner"));
- $out .= getTitleFieldOfList($langs->trans("Type"));
- $out .= getTitleFieldOfList($langs->trans("Label"), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
- $out .= getTitleFieldOfList($langs->trans("Date"), 0, $_SERVER["PHP_SELF"], 'a.datep,a.id', '', $param, 'align="center"', $sortfield, $sortorder);
- $out .= getTitleFieldOfList($langs->trans("RelatedObjects"), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
- $out .= getTitleFieldOfList($langs->trans("ActionOnContact"), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
- $out .= getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], 'a.percent', '', $param, 'align="center"', $sortfield, $sortorder);
+ $out .= getTitleFieldOfList("Ref", 0, $_SERVER["PHP_SELF"], 'a.id', '', $param, '', $sortfield, $sortorder);
+ $out .= getTitleFieldOfList("Owner");
+ $out .= getTitleFieldOfList("Type");
+ $out .= getTitleFieldOfList("Label", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
+ $out .= getTitleFieldOfList("Date", 0, $_SERVER["PHP_SELF"], 'a.datep,a.id', '', $param, '', $sortfield, $sortorder, 'center ');
+ $out .= getTitleFieldOfList("RelatedObjects", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
+ $out .= getTitleFieldOfList("ActionOnContact", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'tdoverflowmax125 ', 0, '', 0);
+ $out .= getTitleFieldOfList("Status", 0, $_SERVER["PHP_SELF"], 'a.percent', '', $param, '', $sortfield, $sortorder, 'center ');
$out .= getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'maxwidthsearch ');
$out .= '';
@@ -1782,7 +1782,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
$out .= ' | ';
// Author of event
- $out .= '';
+ $out .= ' | ';
//$userstatic->id=$histo[$key]['userid'];
//$userstatic->login=$histo[$key]['login'];
//$out.=$userstatic->getLoginUrl(1);
@@ -1813,25 +1813,27 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
$labeltype .= ' - '.$arraylist[$actionstatic->code]; // Use code in priority on type_code
}
}
- $out .= ' | ';
+ $out .= ' | ';
$out .= $actionstatic->getTypePicto();
$out .= $labeltype;
$out .= ' | ';
- // Title
- $out .= '';
+ // Title/Label of event
+ $out .= ' | trans("Action".$histo[$key]['acode']);
$libelle = ($transcode != "Action".$histo[$key]['acode'] ? $transcode : $histo[$key]['alabel']);
//$actionstatic->libelle=$libelle;
$libelle = $histo[$key]['note'];
$actionstatic->id = $histo[$key]['id'];
+ $out .= ' title="'.dol_escape_htmltag($libelle).'">';
$out .= dol_trunc($libelle, 120);
}
if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'mailing') {
$out .= ''.img_object($langs->trans("ShowEMailing"), "email").' ';
$transcode = $langs->trans("Action".$histo[$key]['acode']);
$libelle = ($transcode != "Action".$histo[$key]['acode'] ? $transcode : 'Send mass mailing');
+ $out .= ' title="'.dol_escape_htmltag($libelle).'">';
$out .= dol_trunc($libelle, 120);
}
$out .= ' | ';
@@ -1888,13 +1890,8 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
$out .= '';
// Contact(s) for action
- if (empty($objcon->id) && isset($histo[$key]['contact_id']) && $histo[$key]['contact_id'] > 0) {
- $contactstatic->lastname = $histo[$key]['lastname'];
- $contactstatic->firstname = $histo[$key]['firstname'];
- $contactstatic->id = $histo[$key]['contact_id'];
- $out .= ''.$contactstatic->getNomUrl(1, '', 10).' | ';
- } elseif (isset($histo[$key]['socpeopleassigned']) && is_array($histo[$key]['socpeopleassigned']) && count($histo[$key]['socpeopleassigned']) > 0) {
- $out .= '';
+ if (isset($histo[$key]['socpeopleassigned']) && is_array($histo[$key]['socpeopleassigned']) && count($histo[$key]['socpeopleassigned']) > 0) {
+ $out .= ' | ';
$contact = new Contact($db);
foreach ($histo[$key]['socpeopleassigned'] as $cid => $value) {
$result = $contact->fetch($cid);
@@ -1904,7 +1901,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
}
if ($result > 0) {
- $out .= $contact->getNomUrl(1, '', 16);
+ $out .= $contact->getNomUrl(-3, '', 10, '', -1, 0, 'paddingright');
if (isset($histo[$key]['acode']) && $histo[$key]['acode'] == 'AC_TEL') {
if (!empty($contact->phone_pro)) {
$out .= '('.dol_print_phone($contact->phone_pro).')';
@@ -1914,6 +1911,12 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
}
}
$out .= ' | ';
+ } elseif (empty($objcon->id) && isset($histo[$key]['contact_id']) && $histo[$key]['contact_id'] > 0) {
+ $contactstatic->lastname = $histo[$key]['lastname'];
+ $contactstatic->firstname = $histo[$key]['firstname'];
+ $contactstatic->id = $histo[$key]['contact_id'];
+ $contactstatic->photo = $histo[$key]['contact_photo'];
+ $out .= ''.$contactstatic->getNomUrl(-1, '', 10).' | ';
} else {
$out .= ' | ';
}
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index df7fcc0f005..9f6ac13fbb3 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -4775,6 +4775,7 @@ function getTitleFieldOfList($name, $thead = 0, $file = "", $field = "", $begin
if ($field1 && ($sortfield1 == $field1 || $sortfield1 == preg_replace("/^[^\.]+\./", "", $field1))) {
$liste_titre = 'liste_titre_sel';
}
+
$out .= '<'.$tag.' class="'.$prefix.$liste_titre.'" '.$moreattrib;
//$out .= (($field && empty($conf->global->MAIN_DISABLE_WRAPPING_ON_COLUMN_TITLE) && preg_match('/^[a-zA-Z_0-9\s\.\-:&;]*$/', $name)) ? ' title="'.dol_escape_htmltag($langs->trans($name)).'"' : '');
$out .= ($name && empty($conf->global->MAIN_DISABLE_WRAPPING_ON_COLUMN_TITLE) && empty($forcenowrapcolumntitle) && !dol_textishtml($name)) ? ' title="'.dol_escape_htmltag($langs->trans($name)).'"' : '';
@@ -4809,7 +4810,6 @@ function getTitleFieldOfList($name, $thead = 0, $file = "", $field = "", $begin
//$out .= (empty($conf->global->MAIN_DISABLE_WRAPPING_ON_COLUMN_TITLE) ? ' title="'.dol_escape_htmltag($langs->trans($name)).'"' : '');
$out .= '>';
}
-
if ($tooltip) {
// You can also use 'TranslationString:keyfortooltiponlick' for a tooltip on click.
$tmptooltip = explode(':', $tooltip);