* @author James Hogan (jh559@cs.york.ac.uk) * * @param $Occurrence The occurrence to draw. * @param $Categories The categories. * @param $Squash Whether to squash it up. * @param $ReadOnly Whether the occurrence can be edited by the user. * @param $Path Set of useful paths. */ $CI =& get_instance(); ?> <div class="cal_event cal_event_nojs<?php $cat = $Occurrence->Event->Category; if (array_key_exists($cat, $Categories)) { echo " cal_category_{$cat}"; } echo ' ' . implode(' ', CalCssGetEventClasses($Occurrence)); ?> "> <?php echo '<div class="cal_event_heading"><a href="' . site_url($Path->OccurrenceInfo($Occurrence) . $CI->uri->uri_string() . '">' . xml_escape($Occurrence->Event->Name)) . '</a></div>'; ?> <div class="cal_event_info"> <?php if ($Occurrence->TimeAssociated) { echo $Occurrence->StartTime->Format('%T'); echo ' - '; echo $Occurrence->EndTime->Format('%T'); echo '<br />'; } ?> </div>
?> " class="calendar_day"<?php if ($AllowEventCreate) { ?> onmousedown="clickDay(this,event);" onmouseup="unclickDay(this,event);" onmousemove="moveDay(this,event);"<?php } ?> > <?php foreach ($day['events'] as $time => $ocs) { foreach ($ocs as $event_info) { if ($event_info->DisplayOnCalendar && $event_info->TimeAssociated) { ?> <div class="cal_event cal_event_nojs cal_category_<?php echo $event_info->Event->Category; $classNames = implode(' ', CalCssGetEventClasses($event_info)); if ($classNames != '') { echo " {$classNames}"; } ?> "<?php /* onclick="alert('You clicked on this event!');"*/ ?> > <div class="cal_event_heading"> <?php if ($display_attendence_links && $event_info->UserHasPermission('set_attend') && in_array($event_info->State, array('published', 'cancelled'))) { ?> <div class="cal_event_heading_box"> <?php $attendence_writeable = $event_info->Event->Source->IsSupported('attend');