diff --git a/application/controllers/ScheduleController.php b/application/controllers/ScheduleController.php index 31150f5a5..4e584d726 100644 --- a/application/controllers/ScheduleController.php +++ b/application/controllers/ScheduleController.php @@ -95,6 +95,10 @@ class ScheduleController extends Zend_Controller_Action $this->view->repeats = $formRepeats; $this->view->who = $formWho; $this->view->style = $formStyle; + + $userInfo = Zend_Auth::getInstance()->getStorage()->read(); + $user = new User($userInfo->id); + $this->view->isAdmin = $user->isAdmin(); } public function eventFeedAction() diff --git a/application/views/scripts/schedule/index.phtml b/application/views/scripts/schedule/index.phtml index be67d9afc..3aad9bd0e 100644 --- a/application/views/scripts/schedule/index.phtml +++ b/application/views/scripts/schedule/index.phtml @@ -1,27 +1,5 @@ - +isAdmin) : ?> + render('schedule/add-show-form.phtml') ?> +
diff --git a/public/js/airtime/schedule/full-calendar-functions.js b/public/js/airtime/schedule/full-calendar-functions.js index 9c1d1f4ac..d5e0e5926 100644 --- a/public/js/airtime/schedule/full-calendar-functions.js +++ b/public/js/airtime/schedule/full-calendar-functions.js @@ -53,7 +53,7 @@ function viewDisplay( view ) { } - if($('.fc-header-left tbody td').length === 5) { + if($("#add-show-form").length == 1 && $('.fc-header-left tbody td').length === 5) { $('.fc-header-left tbody tr:first') .append('') .append('Show')