aboutsummaryrefslogtreecommitdiff
path: root/template/assemblies/schedule.phtml
blob: fe0ccbbefe428e828c8d54d97eef206f03aa7cb1 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<div class="schedule scroll-container">
	<div class="scroll-element">
		<div class="now"><span>now</span></div>
		<? $rooms = $schedule->getSchedule() ?>
		<? foreach($rooms as $roomname => $events): ?>
			<? $scheduleRoom = $schedule->getMappedRoom($roomname) ?>
			<div class="room <? if(isset($room) && $roomname == $room->getScheduleName()): ?>highlight<? endif ?>" style="width: <?=round($schedule->getDurationSum() / $schedule->getScale())?>px">
				<? $fromstart = 0; ?>
				<? foreach($events as $event): ?>
					<div
						class="block <?=h(@$event['special'] ?: 'event')?> <?=h((@$event['optout']) ? 'optout' : '')?>"
						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'] ?>
						<? if($scheduleRoom): ?>
							<a
								class="inner"
								<? if (isset($stream)): ?>
										href="<?=h($scheduleRoom->createTabObject($stream->getSelection())->getLink($roomname))?>"
								<? else: ?>
										href="<?=h($scheduleRoom->createTabObject()->getLink($roomname))?>"
								<? endif ?>
								title="Switch to <?=h($scheduleRoom->getDisplay())?>"
							>
						<? else: ?>
							<div class="inner">
						<? endif ?>

							<? 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: ?>
								<? if($event['duration'] > 10*60): /* only display when event is longer as 10 minutes */ ?>
									<h4><?=h(strftime('%H:%M', $event['start']))?>
										&ndash;
										<?=h(strftime('%H:%M', $event['end']))?>
										&nbsp;in&nbsp;
										<?=h($scheduleRoom ? $scheduleRoom->getDisplayShort() : $roomname) ?>
									</h4>
								<? endif ?>
								<h3 title="<?=$event['title']?>">
									<?=h($event['title'])?><? if (@$event['optout']): ?><i> (no stream)</i><? endif ?>
								</h3>
								<? if(! empty(trim($event['speaker']))): ?>
									<h5>by&nbsp;<?=h($event['speaker'])?></h5>
								<? endif ?>
							<? endif ?>

						<? if($scheduleRoom): ?>
							</a>
						<? else: ?>
							</div>
						<? endif ?>
					</div>

				<? endforeach ?>
			</div>
		<? endforeach ?>
	</div>
</div>