side playlist almost done, just need to do drag and drop.

This commit is contained in:
naomiaro 2010-12-21 16:45:36 -05:00
parent 707bb2b183
commit 9fd60932bd
17 changed files with 327 additions and 49 deletions

View file

@ -0,0 +1,43 @@
<?php
class SideplaylistController extends Zend_Controller_Action
{
protected $pl_sess = null;
public function init()
{
if(!Zend_Auth::getInstance()->hasIdentity())
{
$this->_redirect('login/index');
}
//$ajaxContext = $this->_helper->getHelper('AjaxContext');
//$ajaxContext->addActionContext('event-feed', 'json')
// ->initContext();
$this->pl_sess = new Zend_Session_Namespace(UI_PLAYLIST_SESSNAME);
}
public function indexAction()
{
$this->_helper->layout->setLayout('sidebar');
$this->_helper->viewRenderer->setResponseSegment('sidebar');
$pl_sess = $this->pl_sess;
if(isset($pl_sess->id)) {
$pl = Playlist::Recall($pl_sess->id);
if($pl === FALSE) {
unset($pl_sess->id);
return;
}
$this->view->pl = $pl;
}
}
}