aboutsummaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
Diffstat (limited to 'template')
-rw-r--r--template/assemblies/header.phtml6
-rw-r--r--template/assemblies/schedule.phtml13
2 files changed, 15 insertions, 4 deletions
diff --git a/template/assemblies/header.phtml b/template/assemblies/header.phtml
index 43c6494..f7051f1 100644
--- a/template/assemblies/header.phtml
+++ b/template/assemblies/header.phtml
@@ -22,6 +22,12 @@
<span class="fa fa-info"></span>
</a>
</div>
+
+ <? if(isset($room) && $room->hasSchedule()): ?>
+ <div class="navbar-right navbar-time">
+ Current Time
+ </div>
+ <? endif ?>
</div>
</nav>
diff --git a/template/assemblies/schedule.phtml b/template/assemblies/schedule.phtml
index fe0ccbb..2680a44 100644
--- a/template/assemblies/schedule.phtml
+++ b/template/assemblies/schedule.phtml
@@ -1,10 +1,14 @@
<div class="schedule scroll-container">
<div class="scroll-element">
- <div class="now"><span>now</span></div>
+ <? $totalWidth = round($schedule->getDurationSum() / $schedule->getScale()) ?>
+ <div class="now" style="width: <?= h($totalWidth) ?>px">
+ <div class="overlay"></div>
+ <div class="label">now</div>
+ </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">
+ <div class="room <? if(isset($room) && $roomname == $room->getScheduleName()): ?>highlight<? endif ?>" style="width: <?= h($totalWidth) ?>px">
<? $fromstart = 0; ?>
<? foreach($events as $event): ?>
<div
@@ -12,6 +16,7 @@
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'])?>"
+ data-offset="<?=intval($event['offset']/60)?>"
>
<? $fromstart += $event['duration'] ?>
<? if($scheduleRoom): ?>
@@ -42,9 +47,9 @@
<? else: ?>
<? if($event['duration'] > 10*60): /* only display when event is longer as 10 minutes */ ?>
- <h4><?=h(strftime('%H:%M', $event['start']))?>
+ <h4><?=h($event['tstart'])?>
&ndash;
- <?=h(strftime('%H:%M', $event['end']))?>
+ <?=h($event['tend'])?>
&nbsp;in&nbsp;
<?=h($scheduleRoom ? $scheduleRoom->getDisplayShort() : $roomname) ?>
</h4>