2011-01-22 00:14:59 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class NowplayingController extends Zend_Controller_Action
|
|
|
|
{
|
|
|
|
|
|
|
|
public function init()
|
|
|
|
{
|
2011-01-26 23:08:30 +01:00
|
|
|
$ajaxContext = $this->_helper->getHelper('AjaxContext');
|
2011-04-12 06:14:26 +02:00
|
|
|
$ajaxContext->addActionContext('get-data-grid-data', 'json')
|
|
|
|
->initContext();
|
2011-01-22 00:14:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function indexAction()
|
|
|
|
{
|
2011-01-27 03:43:56 +01:00
|
|
|
$this->view->headScript()->appendFile('/js/datatables/js/jquery.dataTables.min.js','text/javascript');
|
2011-01-27 05:32:43 +01:00
|
|
|
$this->view->headScript()->appendFile('/js/playlist/nowplayingdatagrid.js','text/javascript');
|
2011-02-08 01:03:14 +01:00
|
|
|
$this->view->headScript()->appendFile('/js/playlist/nowview.js','text/javascript');
|
2011-01-22 00:14:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getDataGridDataAction()
|
|
|
|
{
|
2011-02-05 00:22:15 +01:00
|
|
|
$viewType = $this->_request->getParam('view');
|
2011-02-08 01:03:14 +01:00
|
|
|
$dateString = $this->_request->getParam('date');
|
2011-04-12 06:14:26 +02:00
|
|
|
$this->view->entries = Application_Model_Nowplaying::GetDataGridData($viewType, $dateString);
|
2011-01-26 23:08:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function livestreamAction()
|
|
|
|
{
|
|
|
|
//use bare bones layout (no header bar or menu)
|
2011-02-08 01:03:14 +01:00
|
|
|
$this->_helper->layout->setLayout('bare');
|
2011-01-22 00:14:59 +01:00
|
|
|
}
|
2011-02-08 01:03:14 +01:00
|
|
|
|
|
|
|
public function dayViewAction()
|
|
|
|
{
|
|
|
|
$this->view->headScript()->appendFile('/js/datatables/js/jquery.dataTables.min.js','text/javascript');
|
|
|
|
$this->view->headScript()->appendFile('/js/playlist/nowplayingdatagrid.js','text/javascript');
|
|
|
|
$this->view->headScript()->appendFile('/js/playlist/dayview.js','text/javascript');
|
|
|
|
}
|
2011-01-22 00:14:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-26 23:08:30 +01:00
|
|
|
|
|
|
|
|
2011-02-08 01:03:14 +01:00
|
|
|
|
|
|
|
|