diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 850187c9dd3..92141599a9e 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -13351,7 +13351,23 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = '', $n && $actionstatic->code != 'AC_TICKET_MODIFY' ) { $out .= '
'; - $out .= $histo[$key]['message']; + $truncateLines = getDolGlobalInt('MAIN_TRUNCATE_TIMELINE_MESSAGE', 3); + $truncatedText = dolGetFirstLineOfText($histo[$key]['message'], $truncateLines); + if ($truncateLines > 0 && strlen($histo[$key]['message']) > strlen($truncatedText)) { + $out .= '
'; + $out .= '
'; + $out .= $truncatedText ; + $out .= ' '.$langs->trans("ReadMore").' '; + $out .= '
'; + $out .= '
'; + $out .= $histo[$key]['message']; + $out .= ' '.$langs->trans("ReadLess").''; + $out .= '
'; + $out .= '
'; + } else { + $out .= $histo[$key]['message']; + } + $out .= '
'; } @@ -13447,6 +13463,26 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = '', $n $out .= "\n"; + $out .= ''; + + if (empty($histo)) { $out .= ''.$langs->trans("NoRecordFound").''; } diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index 70ce8809858..589f9f5a6c4 100644 --- a/htdocs/langs/en_US/agenda.lang +++ b/htdocs/langs/en_US/agenda.lang @@ -202,3 +202,5 @@ BookingSuccessfullyBooked=Your booking has been saved BookingReservationHourAfter=We confirm the reservation of our meeting at the date %s BookcalBookingTitle=Online appointment Transparency = Transparency +ReadMore = Read more +ReadLess = Read less \ No newline at end of file diff --git a/htdocs/theme/eldy/timeline.inc.php b/htdocs/theme/eldy/timeline.inc.php index e8790738898..f4588117939 100644 --- a/htdocs/theme/eldy/timeline.inc.php +++ b/htdocs/theme/eldy/timeline.inc.php @@ -217,6 +217,23 @@ a.timeline-btn:hover width: 100px; } +.readmore-block.--closed .readmore-block__full-text, .readmore-block.--open .readmore-block__excerpt{ + display: none; +} + +.read-less-link, .read-more-link{ + font-weight: bold; +} + +.read-less-link{ + display: block; + text-align: center; +} + + + .read-less-link .fa, .read-more-link .fa{ + color: inherit; +} /* Force values for small screen 767 */ @media only screen and (max-width: 767px)