CC-3174 Show Builder
experimenting
This commit is contained in:
parent
561b508162
commit
859213b760
12 changed files with 266 additions and 101 deletions
|
@ -23,7 +23,15 @@ class LibraryController extends Zend_Controller_Action
|
|||
$this->search_sess = new Zend_Session_Namespace("search");
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
public function indexAction() {
|
||||
|
||||
$this->_helper->layout->setLayout('library');
|
||||
|
||||
$this->_helper->actionStack('library', 'library');
|
||||
$this->_helper->actionStack('index', 'playlist');
|
||||
}
|
||||
|
||||
public function libraryAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$baseUrl = $request->getBaseUrl();
|
||||
|
@ -43,7 +51,6 @@ class LibraryController extends Zend_Controller_Action
|
|||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/datatables/css/ColVis.css');
|
||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/datatables/css/ColReorder.css');
|
||||
|
||||
$this->_helper->layout->setLayout('library');
|
||||
$this->_helper->viewRenderer->setResponseSegment('library');
|
||||
|
||||
$form = new Application_Form_AdvancedSearch();
|
||||
|
@ -53,8 +60,6 @@ class LibraryController extends Zend_Controller_Action
|
|||
$this->search_sess->next_row[1] = 2;
|
||||
$this->view->form = $form;
|
||||
$this->view->md = $this->search_sess->md;
|
||||
|
||||
$this->_helper->actionStack('index', 'playlist');
|
||||
}
|
||||
|
||||
public function contextMenuAction()
|
||||
|
@ -183,7 +188,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
$this->view->id = $id;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function deleteGroupAction()
|
||||
{
|
||||
$ids = $this->_getParam('ids');
|
||||
|
@ -217,7 +222,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
Application_Model_RabbitMq::SendMessageToMediaMonitor("file_delete", $data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->view->ids = $ids;
|
||||
}
|
||||
}
|
||||
|
@ -228,7 +233,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
$post = $this->getRequest()->getPost();
|
||||
Logging::log(print_r($post, true));
|
||||
$datatables = Application_Model_StoredFile::searchFilesForPlaylistBuilder($post);
|
||||
|
||||
|
||||
//format clip lengh to 1 decimal
|
||||
foreach($datatables["aaData"] as &$data){
|
||||
if($data['ftype'] == 'audioclip'){
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
|
||||
class ShowbuilderController extends Zend_Controller_Action
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
$ajaxContext = $this->_helper->getHelper('AjaxContext');
|
||||
$ajaxContext->addActionContext('schedule', 'json')
|
||||
->initContext();
|
||||
}
|
||||
|
||||
public function indexAction() {
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
$user_id = $request->getParam("uid", 0);
|
||||
$show_instance_id = $request->getParam("sid", 0);
|
||||
|
||||
try {
|
||||
$user = new Application_Model_User($user_id);
|
||||
$show_instance = new Application_Model_ShowInstance($show_instance_id);
|
||||
}
|
||||
catch(Exception $e) {
|
||||
$this->_helper->redirector('denied', 'error');
|
||||
}
|
||||
|
||||
//user is allowed to schedule this show.
|
||||
if ($user->isAdmin() || $user->isHost($show_instance->getShowId())) {
|
||||
$this->_helper->layout->setLayout('builder');
|
||||
|
||||
$this->_helper->actionStack('library', 'library');
|
||||
$this->_helper->actionStack('builder', 'showbuilder');
|
||||
}
|
||||
else {
|
||||
$this->_helper->redirector('denied', 'error');
|
||||
}
|
||||
}
|
||||
|
||||
public function builderAction() {
|
||||
|
||||
$request = $this->getRequest();
|
||||
$baseUrl = $request->getBaseUrl();
|
||||
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/fullcalendar/fullcalendar_orig.js','text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/showbuilder/builder.js','text/javascript');
|
||||
|
||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/fullcalendar.css');
|
||||
|
||||
$this->_helper->viewRenderer->setResponseSegment('builder');
|
||||
}
|
||||
|
||||
public function eventFeedAction() {
|
||||
|
||||
}
|
||||
|
||||
public function scheduleAction() {
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue