Debug v23
This commit is contained in:
parent
0e566ac49f
commit
9940db94d9
1 changed files with 21 additions and 13 deletions
|
|
@ -3864,7 +3864,7 @@ function dol_strftime($fmt, $ts = false, $is_gmt = false)
|
|||
* 'tzuserrel' => output string is for user TZ (current browser TZ with dst or not, depending on date position)
|
||||
* @param ?Translate $outputlangs Object lang that contains language for text translation.
|
||||
* @param boolean $encodetooutput Use true to convert/encode string into the HTML rendering pagecode (false=keep UTF8 by default)
|
||||
* @param int $decorate Use 1 to apply a HTML css style to decorate the date
|
||||
* @param int|string $decorate Use 1 or a css to apply a HTML css style to decorate the date
|
||||
* @return string Formatted date or '' if time is null
|
||||
*
|
||||
* @see dol_mktime(), dol_stringtotime(), dol_getdate(), selectDate()
|
||||
|
|
@ -4113,8 +4113,8 @@ function dol_print_date($time, $format = '', $tzoutput = 'auto', $outputlangs =
|
|||
}
|
||||
|
||||
if ($decorate) {
|
||||
$ret = preg_replace('/(\d\d:\d\d [AP]M)$/', '<span class="opacitymedium">\1</span>', $ret);
|
||||
$ret = preg_replace('/(\d\d:\d\d)$/', '<span class="opacitymedium">\1</span>', $ret);
|
||||
$ret = preg_replace('/(\d\d:\d\d [AP]M)$/', '<span class="'.($decorate === 1 ? 'opacitymedium' : $decorate).'">\1</span>', $ret);
|
||||
$ret = preg_replace('/(\d\d:\d\d)$/', '<span class="'.($decorate === 1 ? 'opacitymedium' : $decorate).'">\1</span>', $ret);
|
||||
}
|
||||
|
||||
return $ret;
|
||||
|
|
@ -16387,7 +16387,7 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null,
|
|||
'datestart' => $db->jdate($obj->dp),
|
||||
'dateend' => $db->jdate($obj->dp2),
|
||||
'note' => $obj->label,
|
||||
'message' => dol_htmlentitiesbr($obj->message),
|
||||
'message' => $obj->message,
|
||||
'percent' => $obj->percent,
|
||||
|
||||
'userid' => $obj->user_id,
|
||||
|
|
@ -16417,7 +16417,7 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null,
|
|||
'datestart' => $db->jdate($obj->dp),
|
||||
'dateend' => $db->jdate($obj->dp2),
|
||||
'note' => $obj->label,
|
||||
'message' => dol_htmlentitiesbr($obj->message),
|
||||
'message' => $obj->message,
|
||||
'percent' => $obj->percent,
|
||||
'acode' => $obj->acode,
|
||||
|
||||
|
|
@ -16629,16 +16629,23 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null,
|
|||
$out .= '</span>';
|
||||
|
||||
// Date
|
||||
$out .= '<span class="time"><i class="fa fa-clock-o valignmiddle"></i> <span class="valignmiddle">';
|
||||
$out .= '<span class="time"><i class="fa fa-clock valignmiddle"></i> ';
|
||||
$out .= '<span class="valignmiddle marginrightonly">';
|
||||
$out .= dol_print_date($histo[$key]['datestart'], 'day', 'tzuserrel');
|
||||
$out .= ' '.dol_print_date($histo[$key]['datestart'], 'hour', 'tzuserrel', null, false, 1);
|
||||
//$out .= '</span>';
|
||||
//$out .= '<span class="valignmiddle">'.
|
||||
$out .= ' '.dol_print_date($histo[$key]['datestart'], 'hour', 'tzuserrel', null, false, 'opacitymedium');
|
||||
//$out .= '</span>';
|
||||
if ($histo[$key]['dateend'] && $histo[$key]['dateend'] != $histo[$key]['datestart']) {
|
||||
$tmpa = dol_getdate($histo[$key]['datestart'], true);
|
||||
$tmpb = dol_getdate($histo[$key]['dateend'], true);
|
||||
if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) {
|
||||
$out .= '-' . dol_print_date($histo[$key]['dateend'], 'hour', 'tzuserrel', null, false, 1);
|
||||
$out .= ' - ' . dol_print_date($histo[$key]['dateend'], 'hour', 'tzuserrel', null, false, 1);
|
||||
} else {
|
||||
$out .= '-' . dol_print_date($histo[$key]['dateend'], 'dayhour', 'tzuserrel', null, false, 1);
|
||||
$out .= ' - ' . dol_print_date($histo[$key]['dateend'], 'day', 'tzuserrel');
|
||||
//$out .= '<span class="valignmiddle marginrightonly">';
|
||||
$out .= ' '.dol_print_date($histo[$key]['dateend'], 'hour', 'tzuserrel', null, false, 'opacitymedium');
|
||||
//$out .= '</span>';
|
||||
}
|
||||
}
|
||||
$late = 0;
|
||||
|
|
@ -16749,20 +16756,21 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null,
|
|||
) {
|
||||
$out .= '<div class="timeline-body wordbreak small">';
|
||||
$truncateLines = getDolGlobalInt('MAIN_TRUNCATE_TIMELINE_MESSAGE', 3);
|
||||
$truncatedText = dolGetFirstLineOfText($histo[$key]['message'], $truncateLines);
|
||||
if ($truncateLines > 0 && strlen($histo[$key]['message']) > strlen($truncatedText)) {
|
||||
$newmess = dol_htmlentitiesbr($histo[$key]['message']);
|
||||
$truncatedText = dolGetFirstLineOfText($newmess, $truncateLines);
|
||||
if ($truncateLines > 0 && strlen($newmess) > strlen($truncatedText)) {
|
||||
$out .= '<div class="readmore-block --closed" >';
|
||||
$out .= ' <div class="readmore-block__excerpt">';
|
||||
$out .= dolPrintHTML($truncatedText);
|
||||
$out .= ' <br><a class="read-more-link" data-read-more-action="open" href="' . DOL_MAIN_URL_ROOT . '/comm/action/card.php?id=' . $actionstatic->id . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?' . $param) . '" >' . $langs->trans("ReadMore") . ' <span class="fa fa-chevron-right" aria-hidden="true"></span></a>';
|
||||
$out .= ' </div>';
|
||||
$out .= ' <div class="readmore-block__full-text" >';
|
||||
$out .= dolPrintHTML($histo[$key]['message']);
|
||||
$out .= dolPrintHTML($newmess);
|
||||
$out .= ' <a class="read-less-link" data-read-more-action="close" href="#" ><span class="fa fa-chevron-up" aria-hidden="true"></span> ' . $langs->trans("ReadLess") . '</a>';
|
||||
$out .= ' </div>';
|
||||
$out .= '</div>';
|
||||
} else {
|
||||
$out .= dolPrintHTML($histo[$key]['message']);
|
||||
$out .= dolPrintHTML($newmess);
|
||||
}
|
||||
|
||||
$out .= '</div>';
|
||||
|
|
|
|||
Loading…
Reference in a new issue