diff options
Diffstat (limited to '')
-rw-r--r-- | template/assemblies/schedule.phtml | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/template/assemblies/schedule.phtml b/template/assemblies/schedule.phtml index 482ea39..f913b64 100644 --- a/template/assemblies/schedule.phtml +++ b/template/assemblies/schedule.phtml @@ -1,15 +1,18 @@ <div class="schedule scroll-container"> <div class="scroll-element"> <div class="now"><span>now</span></div> - <? foreach($schedule->getSchedule() as $roomname => $events): ?> - <div class="room <? if($roomname == $room->getSlug()): ?>highlight<? endif ?>" style="width: <?=round($schedule->getDurationSum() / $schedule->getScale()) + 50?>px"> + <? $rooms = $schedule->getSchedule() ?> + <? foreach($rooms as $roomname => $events): ?> + <div class="room <? if($roomname == $room->getSlug()): ?>highlight<? endif ?>" style="width: <?=round($schedule->getDurationSum() / $schedule->getScale())?>px"> + <? $fromstart = 0; ?> <? foreach($events as $event): ?> <div class="block <?=h(@$event['special'] ?: 'event')?>" - style="width: <?=h(round($event['duration'] / $schedule->getScale()))?>px" + style="width: <?=h(round($event['duration'] / $schedule->getScale()))?>px; left: <?=h(round($fromstart / $schedule->getScale()))?>px" data-start="<?=intval($event['start'])?>" data-end="<?=intval($event['end'])?>" > + <? $fromstart += $event['duration'] ?> <? $scheduleRoom = Room::createIfExists($roomname) ?> <? if($scheduleRoom): ?> <a |