From 7f2b1c65f9d318fdf1d10ad742a35314051fc7bc Mon Sep 17 00:00:00 2001 From: Naomi Date: Tue, 8 Apr 2014 13:00:01 -0400 Subject: [PATCH] CC-5778 : Improving Builder Rendering Time adding a show empty row for currently playing shows to get a cursor. --- airtime_mvc/application/models/ShowBuilder.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/models/ShowBuilder.php b/airtime_mvc/application/models/ShowBuilder.php index 8e9266ed3..df1915782 100644 --- a/airtime_mvc/application/models/ShowBuilder.php +++ b/airtime_mvc/application/models/ShowBuilder.php @@ -298,7 +298,7 @@ class Application_Model_ShowBuilder foreach ($scheduledItems as $scheduledItem) { - //if there's a filler row it's status is -1, don't display it. + //if there's a filler row its status is -1, don't display it. if ($scheduledItem->getDbPlayoutStatus() >= 0) { $schedStartDT = $scheduledItem->getDbStarts(null); @@ -353,7 +353,20 @@ class Application_Model_ShowBuilder //empty normal show. if (count($scheduledItems) === 0 && !$showInstance->isRecorded()) { $row["empty"] = true; - $row["id"] = 0 ; + $row["id"] = 0; + $row["instance"] = $instance; + + self::itemRowCheck($showInstance, $row); + + $rows[] = $row; + } + //a show that's currently played all its scheduled content but is now empty, needs an empty row. + else if (count($scheduledItems) > 0 + && $this->epoch_now < floatval($showEndDT->format("U.u")) + && $this->epoch_now > floatval($schedEndDT->format("U.u"))) { + + $row["empty"] = true; + $row["id"] = $scheduledItem->getDbId(); $row["instance"] = $instance; self::itemRowCheck($showInstance, $row);