aboutsummaryrefslogtreecommitdiff
path: root/template/assemblies/schedule.phtml
blob: b749e0b4d28026e5bd5407bd87ffff58f993f95f (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
<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">
				<? 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']))?>
								&ndash;
								<?=h(strftime('%H:%M', $event['end']))?>
								&nbsp;in&nbsp;
								<? 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&nbsp;<?=h($event['speaker'])?></h5>
							<? endif ?>
						<? endif ?>
					</div>

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