getRange(); $cell_height = $calendar_view->getHeight() + 2; $cell_steps = $cell_height / 60; ?>
getColumns() as $column) : ?> getColumns() as $column) : ?>
getURL()): ?> getTitle()) ?> getURL()): ?>
:00
getGroupedEntries(); if (!empty($groups)) : $width = round(100 / sizeof($groups), 2); $col = 0; foreach ($groups as $grouped_entries) : foreach ($grouped_entries as $entry) : // if we have a grouped entry, use start- and end-time of any entry, the are all the same $calc_entry = $calendar_view->isGrouped() ? $entry[0] : $entry; // move the box up, if the user has set a later start-hour for his schedule $calc_entry['end'] -= $start_hour * 100; // if the start is out of range of the displayed hours, clip the box if ($calc_entry['start'] < $start_hour * 100) { $calc_entry['start'] = 0; } else { $calc_entry['start'] -= $start_hour * 100; } // calculate the position and height of the entry $top = floor($cell_height * floor($calc_entry['start'] / 100) + $cell_steps * floor($calc_entry['start'] % 100)); $bottom = floor($cell_height * floor($calc_entry['end'] / 100) + $cell_steps * floor($calc_entry['end'] % 100)) - 1; // how many concurring entries has this entry? $max = 0; $current_matrix = $column->getMatrix(); for ($i = ($calc_entry['start'] + 1 + ($start_hour * 100)); $i < $calc_entry['end'] + ($start_hour * 100); $i++) { if (isset($current_matrix[$i])) { $max = max($max, $current_matrix[$i]); } } // set height and width $height = $bottom - $top; $this->top = $top; $this->width = $width; $this->height = $height; $this->entry = $entry; $this->col = $col; // if we have no concurring entries set the maximum useful width if ($max == 1) $this->width = '100'; if ($calendar_view->isGrouped()) { echo $this->render_partial('calendar/entries/grouped_entry', ['day' => $column->getId()]); } else { echo $this->render_partial('calendar/entries/entry'); } endforeach; /* cycle thrugh entries */ $col++; endforeach; /* cycle through columns */ endif; ?>