CC-3174 : showbuilder

making sure recorded shows aren't editable.
This commit is contained in:
Naomi Aro 2012-03-01 17:49:11 +01:00
parent b813ba1035
commit b68204751e
2 changed files with 17 additions and 3 deletions

View File

@ -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"));

View File

@ -246,6 +246,13 @@ var AIRTIME = (function(AIRTIME){
fnPrepareSeparatorRow(sSeparatorHTML, cl, 0);
}
else if (aData.record === true) {
sSeparatorHTML = '<span>Recording From Line In</span>';
cl = cl + " sb-record odd";
fnPrepareSeparatorRow(sSeparatorHTML, cl, 0);
}
else {
node = nRow.children[0];