diff options
author | MaZderMind | 2016-12-18 13:34:57 +0100 |
---|---|---|
committer | MaZderMind | 2016-12-18 13:34:57 +0100 |
commit | a12d86ec058bc89e6feeda6ec8cfce691269b0a9 (patch) | |
tree | 6be1f764a8addd025eb774bcd2039788a4b1873f /view/overview.php | |
parent | 521f0e2e1c94538fdce65a021144180f368364d9 (diff) | |
parent | efd0b59f8ed363e12211894d8892e4d18b198c04 (diff) |
Merge branch 'master' into events/33c3
Diffstat (limited to '')
-rw-r--r-- | view/overview.php | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/view/overview.php b/view/overview.php index 3b52e8f..adc8d5f 100644 --- a/view/overview.php +++ b/view/overview.php @@ -1,8 +1,26 @@ <?php +$schedule = $conference->getSchedule(); + +$talksPerRoom = $schedule->getSchedule(); +$now = time() + $schedule->getSimulationOffset(); + +$upcomingTalksPerRoom = array_map(function($talks) use($now) { + return [ + 'current' => array_filter_last($talks, function($talk) use ($now) { + return $talk['start'] < $now && $talk['end'] > $now; + }), + 'next' => array_filter_first($talks, function($talk) use ($now) { + return !isset($talk['special']) && $talk['start'] > $now; + }), + ]; +}, $talksPerRoom); + echo $tpl->render(array( 'page' => 'overview', 'title' => 'Live-Streams', - 'overview' => new Overview(), + 'overview' => $conference->getOverview(), + + 'upcomingTalksPerRoom' => $upcomingTalksPerRoom, )); |