schedule show finds playlists available and returns show content better
This commit is contained in:
parent
ad869e0f7f
commit
0ffa232b6d
3 changed files with 31 additions and 37 deletions
|
@ -141,35 +141,33 @@ class ScheduleController extends Zend_Controller_Action
|
|||
public function scheduleShowAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
|
||||
$start = $this->_getParam('start');
|
||||
$end = $this->_getParam('end');
|
||||
$showId = $this->_getParam('showId');
|
||||
$day = $this->_getParam('day');
|
||||
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
|
||||
$user = new User($userInfo->id, $userInfo->type);
|
||||
$show = new Show($user, $showId);
|
||||
|
||||
if($request->isPost()) {
|
||||
|
||||
$plId = $this->_getParam('plId');
|
||||
$start = $this->_getParam('start');
|
||||
$end = $this->_getParam('end');
|
||||
$showId = $this->_getParam('showId');
|
||||
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
|
||||
$user = new User($userInfo->id, $userInfo->type);
|
||||
$show = new Show($user, $showId);
|
||||
$show->scheduleShow($start, array($plId));
|
||||
|
||||
$this->view->showContent = $show->getShowContent($start);
|
||||
$this->view->chosen = $this->view->render('schedule/scheduled-content.phtml');
|
||||
|
||||
unset($this->view->showContent);
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
$length = $this->_getParam('length');
|
||||
$this->view->playlists = $show->searchPlaylistsForShow($day);
|
||||
$this->view->showContent = $show->getShowContent($start);
|
||||
|
||||
$this->view->playlists = Playlist::searchPlaylists($length);
|
||||
$this->view->dialog = $this->view->render('schedule/schedule-show.phtml');
|
||||
$this->view->chosen = $this->view->render('schedule/scheduled-content.phtml');
|
||||
$this->view->dialog = $this->view->render('schedule/schedule-show.phtml');
|
||||
|
||||
unset($this->view->playlists);
|
||||
}
|
||||
unset($this->view->showContent);
|
||||
unset($this->view->playlists);
|
||||
|
||||
}
|
||||
|
||||
public function clearShowAction()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue