diff --git a/calendar/inc/class.calendar_uiviews.inc.php b/calendar/inc/class.calendar_uiviews.inc.php index b9155c5d35..7e2f23d1c3 100644 --- a/calendar/inc/class.calendar_uiviews.inc.php +++ b/calendar/inc/class.calendar_uiviews.inc.php @@ -1809,6 +1809,13 @@ class calendar_uiviews extends calendar_ui (isset($data['border']) ? '&border='.urlencode($data['border']) : '')); } */ + // Add event description to cal event view body if the event is long enough (3 hours or whole day event) + // to be able to show some lines of description text + if ($event['whole_day'] || ($event['end'] - $event['start']) >= 10800) + { + $tpl->set_var('bodydescription', !$is_private ? nl2br(html::htmlspecialchars($event['description'])) : ''); + } + $tooltip = $tpl->fp('tooltip','event_tooltip'); $html = $tpl->fp('out',$block); diff --git a/calendar/templates/default/event_widget.tpl b/calendar/templates/default/event_widget.tpl index c2190a7ee2..955ff7a321 100644 --- a/calendar/templates/default/event_widget.tpl +++ b/calendar/templates/default/event_widget.tpl @@ -3,7 +3,12 @@ {indent} {header} {indent}
{icons}
{indent} -{indent}
{title}
+{indent}
+{indent}

+{indent} {title} +{indent}
{bodydescription} +{indent}

+{indent}