CC-5626: Context menu -> Edit -> Doesn't populate show forms properly
This commit is contained in:
parent
d056ee8c2e
commit
310cfddd3a
1 changed files with 21 additions and 20 deletions
|
@ -128,34 +128,35 @@ class Application_Service_CalendarService
|
||||||
|
|
||||||
$excludeIds = $this->ccShow->getEditedRepeatingInstanceIds();
|
$excludeIds = $this->ccShow->getEditedRepeatingInstanceIds();
|
||||||
|
|
||||||
$isRepeating = true;
|
$isRepeating = $this->ccShow->isRepeating();
|
||||||
$populateInstance = false;
|
$populateInstance = false;
|
||||||
if (in_array($this->ccShowInstance->getDbId(), $excludeIds)) {
|
if ($isRepeating && in_array($this->ccShowInstance->getDbId(), $excludeIds)) {
|
||||||
$populateInstance = true;
|
$populateInstance = true;
|
||||||
$isRepeating = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->ccShowInstance->isRebroadcast() && $isAdminOrPM) {
|
if (!$this->ccShowInstance->isRebroadcast() && $isAdminOrPM) {
|
||||||
if ($isRepeating) {
|
if ($isRepeating) {
|
||||||
$menu["edit"] = array(
|
if ($populateInstance) {
|
||||||
"name" => _("Edit"),
|
$menu["edit"] = array(
|
||||||
"icon" => "edit",
|
"name" => _("Edit Show"),
|
||||||
"items" => array());
|
"icon" => "edit",
|
||||||
|
"url" => $baseUrl."Schedule/populate-repeating-show-instance-form");
|
||||||
|
} else {
|
||||||
|
$menu["edit"] = array(
|
||||||
|
"name" => _("Edit"),
|
||||||
|
"icon" => "edit",
|
||||||
|
"items" => array());
|
||||||
|
|
||||||
$menu["edit"]["items"]["all"] = array(
|
$menu["edit"]["items"]["all"] = array(
|
||||||
"name" => _("Edit Show"),
|
"name" => _("Edit Show"),
|
||||||
"icon" => "edit",
|
"icon" => "edit",
|
||||||
"url" => $baseUrl."Schedule/populate-show-form");
|
"url" => $baseUrl."Schedule/populate-show-form");
|
||||||
|
|
||||||
$menu["edit"]["items"]["instance"] = array(
|
$menu["edit"]["items"]["instance"] = array(
|
||||||
"name" => _("Edit This Instance"),
|
"name" => _("Edit This Instance"),
|
||||||
"icon" => "edit",
|
"icon" => "edit",
|
||||||
"url" => $baseUrl."Schedule/populate-repeating-show-instance-form");
|
"url" => $baseUrl."Schedule/populate-repeating-show-instance-form");
|
||||||
} elseif ($populateInstance) {
|
}
|
||||||
$menu["edit"] = array(
|
|
||||||
"name" => _("Edit Show"),
|
|
||||||
"icon" => "edit",
|
|
||||||
"url" => $baseUrl."Schedule/populate-repeating-show-instance-form");
|
|
||||||
} else {
|
} else {
|
||||||
$menu["edit"] = array(
|
$menu["edit"] = array(
|
||||||
"name"=> _("Edit Show"),
|
"name"=> _("Edit Show"),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue