From ddb812a97654b341da2d35d4695f970b3b555dcb Mon Sep 17 00:00:00 2001 From: dedeibel Date: Fri, 28 Dec 2018 21:39:16 +0100 Subject: Mark optouts in schedule view as optout / no stream --- configs/conferences/35c3/main.less | 2 +- model/Schedule.php | 8 ++++++++ template/assemblies/schedule.phtml | 6 +++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/configs/conferences/35c3/main.less b/configs/conferences/35c3/main.less index 8c1a64e..5b27ed6 100644 --- a/configs/conferences/35c3/main.less +++ b/configs/conferences/35c3/main.less @@ -382,7 +382,7 @@ nav { body .schedule { .block { - &.pause { + &.pause, &.optout { background-color: @color-grey-lightest; background-image: linear-gradient(135deg, rgba(255,255,255,.35) 15%, transparent 15%, transparent 30%, rgba(255,255,255,.35) 30%, rgba(255,255,255,.35) 45%, transparent 45%, transparent 60%, rgba(255,255,255,.35) 60%, rgba(255,255,255,.35) 75%, transparent 75%, transparent 90%, rgba(255,255,255,.35) 90%, rgba(255,255,255,.35)); diff --git a/model/Schedule.php b/model/Schedule.php index 4b5d25e..5ffbeda 100644 --- a/model/Schedule.php +++ b/model/Schedule.php @@ -39,6 +39,13 @@ class Schedule return isset( $mapping[$scheduleRoom] ); } + public function isOptout($event) { + if (isset($event->recording)) { + return $event->recording->optout == 'true'; + } + return false; + } + public function getMappedRoom($scheduleRoom) { $mapping = $this->getScheduleToRoomSlugMapping(); return $this->getConference()->getRoomIfExists( @$mapping[$scheduleRoom] ); @@ -199,6 +206,7 @@ class Schedule 'end' => $end, 'duration' => $duration, 'room_known' => $this->isRoomMapped($name), + 'optout' => $this->isOptout($event), ); $lastend = $end; diff --git a/template/assemblies/schedule.phtml b/template/assemblies/schedule.phtml index 461353c..4a737da 100644 --- a/template/assemblies/schedule.phtml +++ b/template/assemblies/schedule.phtml @@ -8,7 +8,7 @@
-

+

@@ -49,7 +49,7 @@ getDisplay() : $roomname) ?>

- + (no stream)

by 
-- cgit v1.2.3