diff --git a/airtime_mvc/application/models/ShowBuilder.php b/airtime_mvc/application/models/ShowBuilder.php index cbc75b2b9..8762a1638 100644 --- a/airtime_mvc/application/models/ShowBuilder.php +++ b/airtime_mvc/application/models/ShowBuilder.php @@ -52,6 +52,11 @@ class Application_Model_ShowBuilder { //check to see if this row should be editable. private function isAllowed($p_item, &$row) { + //cannot schedule in a recorded show. + if (intval($p_item["si_record"]) === 1) { + return; + } + $showStartDT = new DateTime($p_item["si_starts"], new DateTimeZone("UTC")); //can only schedule the show if it hasn't started and you are allowed. @@ -115,8 +120,8 @@ class Application_Model_ShowBuilder { private function makeScheduledItemRow($p_item) { $row = $this->defaultRowArray; - $this->isAllowed($p_item, $row); $this->getRowTimestamp($p_item, $row); + $this->isAllowed($p_item, $row); if (isset($p_item["sched_starts"])) { @@ -156,7 +161,10 @@ class Application_Model_ShowBuilder { $this->contentDT = $schedEndDT; } - //show is empty + //show is empty or is a special kind of show (recording etc) + else if (intval($p_item["si_record"]) === 1) { + $row["record"] = true; + } else { $row["empty"] = true; @@ -170,7 +178,6 @@ class Application_Model_ShowBuilder { private function makeFooterRow($p_item) { $row = $this->defaultRowArray; - //$this->isAllowed($p_item, $row); $row["footer"] = true; $showEndDT = new DateTime($p_item["si_ends"], new DateTimeZone("UTC")); diff --git a/airtime_mvc/public/js/airtime/showbuilder/builder.js b/airtime_mvc/public/js/airtime/showbuilder/builder.js index 2d9497b15..f64d0914e 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/builder.js @@ -246,6 +246,13 @@ var AIRTIME = (function(AIRTIME){ fnPrepareSeparatorRow(sSeparatorHTML, cl, 0); } + else if (aData.record === true) { + + sSeparatorHTML = 'Recording From Line In'; + cl = cl + " sb-record odd"; + + fnPrepareSeparatorRow(sSeparatorHTML, cl, 0); + } else { node = nRow.children[0];