mirror of
https://github.com/voc/streaming-website
synced 2024-11-10 22:54:12 +00:00
60 lines
1.8 KiB
PHTML
60 lines
1.8 KiB
PHTML
<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: <?=ceil($schedule->getDurationSum() / $schedule->getScale())?>px">
|
|
<? foreach($events as $event): ?>
|
|
<div
|
|
class="block <?=h(@$event['special'] ?: 'event')?>"
|
|
style="width: <?=h(round($event['duration'] / $schedule->getScale()))?>px"
|
|
data-start="<?=intval($event['start'])?>"
|
|
data-end="<?=intval($event['end'])?>"
|
|
>
|
|
<? if(@$event['special'] == 'daychange'): ?>
|
|
|
|
<h3><?=h($event['title'])?></h3>
|
|
|
|
<? elseif(@$event['special'] == 'gap'): ?>
|
|
|
|
<!--h3>Gap</h3-->
|
|
|
|
<? elseif(@$event['special'] == 'pause'): ?>
|
|
|
|
<h3><?=h($event['title'])?></h3>
|
|
|
|
<? else: ?>
|
|
|
|
<? $scheduleRoom = Room::createIfExists($roomname) ?>
|
|
<h4><?=h(strftime('%H:%M', $event['start']))?>
|
|
–
|
|
<?=h(strftime('%H:%M', $event['end']))?>
|
|
in
|
|
<? if($scheduleRoom): ?>
|
|
<a href="<?=h($scheduleRoom->createTabObject()->getLink($roomname))?>">
|
|
<?=h($scheduleRoom->getDisplay())?>
|
|
</a>
|
|
<? else: ?>
|
|
<?=h($roomname) ?>
|
|
<? endif ?>
|
|
</h4>
|
|
<h3>
|
|
<? if($scheduleRoom): ?>
|
|
<a
|
|
href="<?=h($scheduleRoom->createTabObject()->getLink($roomname))?>"
|
|
title="Switch to <?=h($scheduleRoom->getDisplay())?>"
|
|
><?=h($event['title'])?></a>
|
|
<? else: ?>
|
|
<?=h($event['title'])?>
|
|
<? endif ?>
|
|
</h3>
|
|
<? if($event['speaker']): ?>
|
|
<h5>by <?=h($event['speaker'])?></h5>
|
|
<? endif ?>
|
|
<? endif ?>
|
|
</div>
|
|
|
|
<? endforeach ?>
|
|
</div>
|
|
<? endforeach ?>
|
|
</div>
|
|
</div>
|