CC-1930 Improve right-click menu on the schedule so the most common actions are first
This commit is contained in:
parent
b6d117d456
commit
2fbabd82eb
1 changed files with 11 additions and 12 deletions
|
@ -146,24 +146,23 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
|
|
||||||
$params = '/format/json/id/#id#';
|
$params = '/format/json/id/#id#';
|
||||||
|
|
||||||
if(strtotime($today_timestamp) < strtotime($show->getShowStart())) {
|
if (strtotime($today_timestamp) < strtotime($show->getShowStart())) {
|
||||||
|
if ($user->isHost($show->getShowId()) || $user->isAdmin()) {
|
||||||
if($user->isAdmin()) {
|
|
||||||
|
|
||||||
$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($user->isHost($show->getShowId()) || $user->isAdmin()) {
|
|
||||||
|
|
||||||
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/clear-show'.$params, 'callback' => 'window["scheduleRefetchEvents"]'), 'title' => 'Clear');
|
|
||||||
|
|
||||||
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/schedule-show-dialog'.$params, 'callback' => 'window["buildScheduleDialog"]'), 'title' => 'Add Content');
|
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/schedule-show-dialog'.$params, 'callback' => 'window["buildScheduleDialog"]'), 'title' => 'Add Content');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/show-content-dialog'.$params, 'callback' => 'window["buildContentDialog"]'),
|
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/show-content-dialog'.$params, 'callback' => 'window["buildContentDialog"]'),
|
||||||
'title' => 'Show Content');
|
'title' => 'Show Content');
|
||||||
|
if (strtotime($today_timestamp) < strtotime($show->getShowStart())) {
|
||||||
|
if ($user->isAdmin()) {
|
||||||
|
$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 ($user->isHost($show->getShowId()) || $user->isAdmin()) {
|
||||||
|
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/clear-show'.$params, 'callback' => 'window["scheduleRefetchEvents"]'), 'title' => 'Remove All Content');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//returns format jjmenu is looking for.
|
//returns format jjmenu is looking for.
|
||||||
die(json_encode($menu));
|
die(json_encode($menu));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue