* Calendar: Add event description to calendar event body if the event is long enough (3 times bigger than calendar view interval).

This commit is contained in:
Hadi Nategh 2014-10-29 08:35:38 +00:00
parent 65cec34408
commit 5f2a173513
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 (ATM 3 times longer than interval)
// to be able to show some lines of description text
if ($event['whole_day'] || ($event['end'] - $event['start']) > ($this->cal_prefs['interval'] * 3 * 60))
{
$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 -->