Set show calendar body description according to calendar interval

This commit is contained in:
Hadi Nategh 2014-10-27 15:02:21 +00:00
parent 60e203180c
commit ea5ec6b787

View File

@ -1809,9 +1809,9 @@ class calendar_uiviews extends calendar_ui
(isset($data['border']) ? '&border='.urlencode($data['border']) : '')); (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) // 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 // to be able to show some lines of description text
if ($event['whole_day'] || ($event['end'] - $event['start']) >= 10800) 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'])) : ''); $tpl->set_var('bodydescription', !$is_private ? nl2br(html::htmlspecialchars($event['description'])) : '');
} }