blob: e3c620deca74f7b3181e45cba648694f7cf35f3e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
<?
foreach(reset($program) as $event)
$width += $event['duration'];
?>
<div class="program scroll-container" data-offset="<?=h($GLOBALS['CONFIG']['SCHEDULE_OFFSET'])?>">
<div class="scroll-element">
<div class="now"><span>now</span></div>
<? foreach($program as $name => $events): ?>
<div class="room <? if($name == $room): ?>highlight<? endif ?>" style="width: <?=$width * $GLOBALS['CONFIG']['SCHEDULE_SCALE'] ?>px">
<? foreach($events as $event): ?>
<div
class="block <?=h(@$event['special'] ?: 'event')?>"
style="width: <?=h($event['duration'] * $GLOBALS['CONFIG']['SCHEDULE_SCALE'])?>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: ?>
<h4><?=h(strftime('%H:%M', $event['start']))?>
–
<?=h(strftime('%H:%M', $event['end']))?>
–
<?=h($name)?>
</h4>
<h3><?=h($event['title'])?></h3>
<? endif ?>
</div>
<? endforeach ?>
</div>
<? endforeach ?>
</div>
</div>
|