forked from Wavyzz/dolibarr
Fix css
This commit is contained in:
@@ -1389,7 +1389,7 @@ class Contact extends CommonObject
|
|||||||
* Return name of contact with link (and eventually picto)
|
* Return name of contact with link (and eventually picto)
|
||||||
* Use $this->id, $this->lastname, $this->firstname, this->civility_id
|
* 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 string $option Where the link point to
|
||||||
* @param int $maxlen Max length of
|
* @param int $maxlen Max length of
|
||||||
* @param string $moreparam Add more param into URL
|
* @param string $moreparam Add more param into URL
|
||||||
@@ -1475,14 +1475,14 @@ class Contact extends CommonObject
|
|||||||
|
|
||||||
$result .= $linkstart;
|
$result .= $linkstart;
|
||||||
if ($withpicto) {
|
if ($withpicto) {
|
||||||
if ($withpicto == -2) {
|
if ($withpicto < 0) {
|
||||||
$result .= '<!-- picto photo user --><span class="nopadding userimg'.($morecss ? ' '.$morecss : '').'">'.Form::showphoto('contact', $this, 0, 0, 0, 'userphoto'.($withpicto == -3 ? 'small' : ''), 'mini', 0, 1).'</span>';
|
$result .= '<!-- picto photo user --><span class="nopadding userimg'.($morecss ? ' '.$morecss : '').'">'.Form::showphoto('contact', $this, 0, 0, 0, 'userphoto'.($withpicto == -3 ? 'small' : ''), 'mini', 0, 1).'</span>';
|
||||||
} else {
|
} 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);
|
$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) {
|
if ($withpicto != 2 && $withpicto != -2) {
|
||||||
$result .= ($maxlen ?dol_trunc($this->getFullName($langs), $maxlen) : $this->getFullName($langs));
|
$result .= '<span class="valigmiddle">'.($maxlen ? dol_trunc($this->getFullName($langs), $maxlen) : $this->getFullName($langs)).'</span>';
|
||||||
}
|
}
|
||||||
$result .= $linkend;
|
$result .= $linkend;
|
||||||
|
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ class FormActions
|
|||||||
* @param string $morecss More css to add to SELECT component.
|
* @param string $morecss More css to add to SELECT component.
|
||||||
* @return string
|
* @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
|
// phpcs:enable
|
||||||
global $langs, $user, $form, $conf;
|
global $langs, $user, $form, $conf;
|
||||||
@@ -399,7 +399,7 @@ class FormActions
|
|||||||
}
|
}
|
||||||
$out .= $form->multiselectarray($htmlname, $arraylist, $selected, 0, 0, 'centpercent', 0, 0);
|
$out .= $form->multiselectarray($htmlname, $arraylist, $selected, 0, 0, 'centpercent', 0, 0);
|
||||||
} else {
|
} 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) {
|
if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0) {
|
||||||
|
|||||||
@@ -1710,7 +1710,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||||||
$out .= '<td class="liste_titre"></td>';
|
$out .= '<td class="liste_titre"></td>';
|
||||||
$out .= '<td class="liste_titre"></td>';
|
$out .= '<td class="liste_titre"></td>';
|
||||||
$out .= '<td class="liste_titre">';
|
$out .= '<td class="liste_titre">';
|
||||||
$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 .= '</td>';
|
$out .= '</td>';
|
||||||
$out .= '<td class="liste_titre maxwidth100onsmartphone"><input type="text" class="maxwidth100onsmartphone" name="search_agenda_label" value="'.$filters['search_agenda_label'].'"></td>';
|
$out .= '<td class="liste_titre maxwidth100onsmartphone"><input type="text" class="maxwidth100onsmartphone" name="search_agenda_label" value="'.$filters['search_agenda_label'].'"></td>';
|
||||||
$out .= '<td class="liste_titre center">';
|
$out .= '<td class="liste_titre center">';
|
||||||
@@ -1741,14 +1741,14 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||||||
}
|
}
|
||||||
$out .= getTitleFieldOfList($tmp);
|
$out .= getTitleFieldOfList($tmp);
|
||||||
}
|
}
|
||||||
$out .= getTitleFieldOfList($langs->trans("Ref"), 0, $_SERVER["PHP_SELF"], 'a.id', '', $param, '', $sortfield, $sortorder);
|
$out .= getTitleFieldOfList("Ref", 0, $_SERVER["PHP_SELF"], 'a.id', '', $param, '', $sortfield, $sortorder);
|
||||||
$out .= getTitleFieldOfList($langs->trans("Owner"));
|
$out .= getTitleFieldOfList("Owner");
|
||||||
$out .= getTitleFieldOfList($langs->trans("Type"));
|
$out .= getTitleFieldOfList("Type");
|
||||||
$out .= getTitleFieldOfList($langs->trans("Label"), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
$out .= getTitleFieldOfList("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("Date", 0, $_SERVER["PHP_SELF"], 'a.datep,a.id', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||||
$out .= getTitleFieldOfList($langs->trans("RelatedObjects"), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
$out .= getTitleFieldOfList("RelatedObjects", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
||||||
$out .= getTitleFieldOfList($langs->trans("ActionOnContact"), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
$out .= getTitleFieldOfList("ActionOnContact", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'tdoverflowmax125 ', 0, '', 0);
|
||||||
$out .= getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], 'a.percent', '', $param, 'align="center"', $sortfield, $sortorder);
|
$out .= getTitleFieldOfList("Status", 0, $_SERVER["PHP_SELF"], 'a.percent', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||||
$out .= getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'maxwidthsearch ');
|
$out .= getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||||
$out .= '</tr>';
|
$out .= '</tr>';
|
||||||
|
|
||||||
@@ -1782,7 +1782,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||||||
$out .= '</td>';
|
$out .= '</td>';
|
||||||
|
|
||||||
// Author of event
|
// Author of event
|
||||||
$out .= '<td class="tdoverflowmax200">';
|
$out .= '<td class="tdoverflowmax150">';
|
||||||
//$userstatic->id=$histo[$key]['userid'];
|
//$userstatic->id=$histo[$key]['userid'];
|
||||||
//$userstatic->login=$histo[$key]['login'];
|
//$userstatic->login=$histo[$key]['login'];
|
||||||
//$out.=$userstatic->getLoginUrl(1);
|
//$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
|
$labeltype .= ' - '.$arraylist[$actionstatic->code]; // Use code in priority on type_code
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$out .= '<td class="tdoverflowmax200" title="'.$labeltype.'">';
|
$out .= '<td class="tdoverflowmax150" title="'.$labeltype.'">';
|
||||||
$out .= $actionstatic->getTypePicto();
|
$out .= $actionstatic->getTypePicto();
|
||||||
$out .= $labeltype;
|
$out .= $labeltype;
|
||||||
$out .= '</td>';
|
$out .= '</td>';
|
||||||
|
|
||||||
// Title
|
// Title/Label of event
|
||||||
$out .= '<td>';
|
$out .= '<td class="tdoverflowmax300"';
|
||||||
if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'action') {
|
if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'action') {
|
||||||
$transcode = $langs->trans("Action".$histo[$key]['acode']);
|
$transcode = $langs->trans("Action".$histo[$key]['acode']);
|
||||||
$libelle = ($transcode != "Action".$histo[$key]['acode'] ? $transcode : $histo[$key]['alabel']);
|
$libelle = ($transcode != "Action".$histo[$key]['acode'] ? $transcode : $histo[$key]['alabel']);
|
||||||
//$actionstatic->libelle=$libelle;
|
//$actionstatic->libelle=$libelle;
|
||||||
$libelle = $histo[$key]['note'];
|
$libelle = $histo[$key]['note'];
|
||||||
$actionstatic->id = $histo[$key]['id'];
|
$actionstatic->id = $histo[$key]['id'];
|
||||||
|
$out .= ' title="'.dol_escape_htmltag($libelle).'">';
|
||||||
$out .= dol_trunc($libelle, 120);
|
$out .= dol_trunc($libelle, 120);
|
||||||
}
|
}
|
||||||
if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'mailing') {
|
if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'mailing') {
|
||||||
$out .= '<a href="'.DOL_URL_ROOT.'/comm/mailing/card.php?id='.$histo[$key]['id'].'">'.img_object($langs->trans("ShowEMailing"), "email").' ';
|
$out .= '<a href="'.DOL_URL_ROOT.'/comm/mailing/card.php?id='.$histo[$key]['id'].'">'.img_object($langs->trans("ShowEMailing"), "email").' ';
|
||||||
$transcode = $langs->trans("Action".$histo[$key]['acode']);
|
$transcode = $langs->trans("Action".$histo[$key]['acode']);
|
||||||
$libelle = ($transcode != "Action".$histo[$key]['acode'] ? $transcode : 'Send mass mailing');
|
$libelle = ($transcode != "Action".$histo[$key]['acode'] ? $transcode : 'Send mass mailing');
|
||||||
|
$out .= ' title="'.dol_escape_htmltag($libelle).'">';
|
||||||
$out .= dol_trunc($libelle, 120);
|
$out .= dol_trunc($libelle, 120);
|
||||||
}
|
}
|
||||||
$out .= '</td>';
|
$out .= '</td>';
|
||||||
@@ -1888,13 +1890,8 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||||||
$out .= '</td>';
|
$out .= '</td>';
|
||||||
|
|
||||||
// Contact(s) for action
|
// Contact(s) for action
|
||||||
if (empty($objcon->id) && isset($histo[$key]['contact_id']) && $histo[$key]['contact_id'] > 0) {
|
if (isset($histo[$key]['socpeopleassigned']) && is_array($histo[$key]['socpeopleassigned']) && count($histo[$key]['socpeopleassigned']) > 0) {
|
||||||
$contactstatic->lastname = $histo[$key]['lastname'];
|
$out .= '<td class="valignmiddle">';
|
||||||
$contactstatic->firstname = $histo[$key]['firstname'];
|
|
||||||
$contactstatic->id = $histo[$key]['contact_id'];
|
|
||||||
$out .= '<td width="120">'.$contactstatic->getNomUrl(1, '', 10).'</td>';
|
|
||||||
} elseif (isset($histo[$key]['socpeopleassigned']) && is_array($histo[$key]['socpeopleassigned']) && count($histo[$key]['socpeopleassigned']) > 0) {
|
|
||||||
$out .= '<td>';
|
|
||||||
$contact = new Contact($db);
|
$contact = new Contact($db);
|
||||||
foreach ($histo[$key]['socpeopleassigned'] as $cid => $value) {
|
foreach ($histo[$key]['socpeopleassigned'] as $cid => $value) {
|
||||||
$result = $contact->fetch($cid);
|
$result = $contact->fetch($cid);
|
||||||
@@ -1904,7 +1901,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($result > 0) {
|
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 (isset($histo[$key]['acode']) && $histo[$key]['acode'] == 'AC_TEL') {
|
||||||
if (!empty($contact->phone_pro)) {
|
if (!empty($contact->phone_pro)) {
|
||||||
$out .= '('.dol_print_phone($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 .= '</td>';
|
$out .= '</td>';
|
||||||
|
} 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 .= '<td width="120">'.$contactstatic->getNomUrl(-1, '', 10).'</td>';
|
||||||
} else {
|
} else {
|
||||||
$out .= '<td> </td>';
|
$out .= '<td> </td>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4775,6 +4775,7 @@ function getTitleFieldOfList($name, $thead = 0, $file = "", $field = "", $begin
|
|||||||
if ($field1 && ($sortfield1 == $field1 || $sortfield1 == preg_replace("/^[^\.]+\./", "", $field1))) {
|
if ($field1 && ($sortfield1 == $field1 || $sortfield1 == preg_replace("/^[^\.]+\./", "", $field1))) {
|
||||||
$liste_titre = 'liste_titre_sel';
|
$liste_titre = 'liste_titre_sel';
|
||||||
}
|
}
|
||||||
|
|
||||||
$out .= '<'.$tag.' class="'.$prefix.$liste_titre.'" '.$moreattrib;
|
$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 .= (($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)).'"' : '';
|
$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 .= (empty($conf->global->MAIN_DISABLE_WRAPPING_ON_COLUMN_TITLE) ? ' title="'.dol_escape_htmltag($langs->trans($name)).'"' : '');
|
||||||
$out .= '>';
|
$out .= '>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($tooltip) {
|
if ($tooltip) {
|
||||||
// You can also use 'TranslationString:keyfortooltiponlick' for a tooltip on click.
|
// You can also use 'TranslationString:keyfortooltiponlick' for a tooltip on click.
|
||||||
$tmptooltip = explode(':', $tooltip);
|
$tmptooltip = explode(':', $tooltip);
|
||||||
|
|||||||
Reference in New Issue
Block a user