CC-3193: context menu "Delete This Instance and All Following" doesn't make sense when appearing on a non-repeating show

Fixed by checking if the show is a repeating show.
This commit is contained in:
Yuchen Wang 2011-12-14 10:12:17 -05:00
parent 29254d49d3
commit 7542d86b94
1 changed files with 8 additions and 6 deletions

View File

@ -238,7 +238,7 @@ class ScheduleController extends Zend_Controller_Action
'title' => 'Cancel Current Show');
}
if ($epochNow < $showStartDateHelper->getTimestamp()) {
if ($epochNow < $showStartDateHelper->getTimestamp()) {
if ($user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER))) {
@ -246,13 +246,15 @@ class ScheduleController extends Zend_Controller_Action
'callback' => 'window["beginEditShow"]'), 'title' => 'Edit Show');
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/delete-show'.$params,
'callback' => 'window["scheduleRefetchEvents"]'), 'title' => 'Delete This Instance');
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/cancel-show'.$params,
'callback' => 'window["scheduleRefetchEvents"]'), 'title' => 'Delete This Instance and All Following');
if ($show->getShow()->isRepeating()) {
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/cancel-show'.$params,
'callback' => 'window["scheduleRefetchEvents"]'), 'title' => 'Delete This Instance and All Following');
}
}
}
}
//returns format jjmenu is looking for.
die(json_encode($menu));
//returns format jjmenu is looking for.
die(json_encode($menu));
}
public function scheduleShowAction()