Add event description to calendar event body if the event is longer than 3 hours

This commit is contained in:
Hadi Nategh 2014-10-27 14:37:38 +00:00
parent 27f13cad92
commit 60e203180c
2 changed files with 13 additions and 1 deletions

View File

@ -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);

View File

@ -3,7 +3,12 @@
{indent} {header}
{indent} <div class="calendar_calEventIcons">{icons}</div>
{indent}</div>
{indent}<div class="calendar_calEventBody{Small}">{title}</div>
{indent}<div class="calendar_calEventBody{Small}">
{indent} <p style="margin: 0px;">
{indent} <span class="calendar_calEventTitle">{title}</span>
{indent} <br>{bodydescription}
{indent} </p>
{indent}</div>
<!-- END event_widget -->
<!-- BEGIN event_widget_wholeday_on_top -->