CC-5634: Can add/remove content to a linked show while one instance is currently playing
Fixed by removing option from context menu
This commit is contained in:
parent
974be86691
commit
fb793ff3e1
|
@ -82,14 +82,24 @@ class Application_Service_CalendarService
|
||||||
// Show content can be modified from the calendar if:
|
// Show content can be modified from the calendar if:
|
||||||
// the user is admin or hosting the show,
|
// the user is admin or hosting the show,
|
||||||
// the show is not recorded
|
// the show is not recorded
|
||||||
|
$currentShow = Application_Model_Show::getCurrentShow();
|
||||||
if ($now < $end && ($isAdminOrPM || $isHostOfShow) &&
|
$showIsLinked = $this->ccShow->isLinked();
|
||||||
!$this->ccShowInstance->isRecorded() ) {
|
if ($now < $end && ($isAdminOrPM || $isHostOfShow) && !$this->ccShowInstance->isRecorded()) {
|
||||||
|
//if the show is not linked the user can add/remove content
|
||||||
|
if (!$showIsLinked) {
|
||||||
|
|
||||||
$menu["schedule"] = array(
|
$menu["schedule"] = array(
|
||||||
"name"=> _("Add / Remove Content"),
|
"name"=> _("Add / Remove Content"),
|
||||||
"icon" => "add-remove-content",
|
"icon" => "add-remove-content",
|
||||||
"url" => $baseUrl."showbuilder/builder-dialog/");
|
"url" => $baseUrl."showbuilder/builder-dialog/");
|
||||||
|
//if the show is linked and it's not currently playing the user can add/remove content
|
||||||
|
} elseif ($showIsLinked && (count($currentShow) > 0 && $currentShow[0]["id"] != $this->ccShow->getDbId())) {
|
||||||
|
|
||||||
|
$menu["schedule"] = array(
|
||||||
|
"name"=> _("Add / Remove Content"),
|
||||||
|
"icon" => "add-remove-content",
|
||||||
|
"url" => $baseUrl."showbuilder/builder-dialog/");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue