Merge branch 'saas-dev' of github.com:sourcefabric/Airtime into saas-dev

This commit is contained in:
Albert Santoni 2015-09-02 15:07:31 -04:00
commit f05157c376
10 changed files with 110 additions and 37 deletions

View file

@ -55,7 +55,7 @@ class Application_Common_UsabilityHints
return _("Upload some tracks below to add them to your library!");
} else {
return sprintf(_("It looks like you haven't uploaded any audio files yet. %sUpload a file now%s."),
"<a href=\"/Plupload\">",
"<a href=\"/plupload\">",
"</a>");
}
} else if (!self::isFutureOrCurrentShowScheduled()) {
@ -63,7 +63,7 @@ class Application_Common_UsabilityHints
return _("Click the 'New Show' button and fill out the required fields.");
} else {
return sprintf(_("It looks like you don't have any shows scheduled. %sCreate a show now%s."),
"<a href=\"/Schedule\">",
"<a href=\"/schedule\">",
"</a>");
}
} else if (self::isCurrentShowEmpty()) {
@ -73,14 +73,14 @@ class Application_Common_UsabilityHints
return _("To start broadcasting, cancel the current linked show by clicking on it and selecting 'Cancel Show'.");
} else {
return sprintf(_("Linked shows need to be filled with tracks before it starts. To start broadcasting cancel the current linked show and schedule an unlinked show.
%sCreate an unlinked show now%s."), "<a href=\"/Schedule\">", "</a>");
%sCreate an unlinked show now%s."), "<a href=\"/schedule\">", "</a>");
}
} else {
if ($userIsOnCalendarPage) {
return _("To start broadcasting, click on the current show and select 'Schedule Show'");
} else {
return sprintf(_("It looks like the current show needs more tracks. %sAdd tracks to your show now%s."),
"<a href=\"/Schedule\">",
"<a href=\"/schedule\">",
"</a>");
}
}
@ -89,7 +89,7 @@ class Application_Common_UsabilityHints
return _("Click on the show starting next and select 'Schedule Show'");
} else {
return sprintf(_("It looks like the next show is empty. %sAdd tracks to your show now%s."),
"<a href=\"/Schedule\">",
"<a href=\"/schedule\">",
"</a>");
}
} else {

View file

@ -30,6 +30,7 @@ class PlaylistController extends Zend_Controller_Action
->addActionContext('get-block-info', 'json')
->addActionContext('shuffle', 'json')
->addActionContext('empty-content', 'json')
->addActionContext('change-playlist', 'json')
->initContext();
//This controller writes to the session all over the place, so we're going to reopen it for writing here.
@ -201,6 +202,16 @@ class PlaylistController extends Zend_Controller_Action
$this->createFullResponse($obj);
}
public function changePlaylistAction() {
$this->view->layout()->disableLayout(); // Don't inject the standard Now Playing header.
$this->_helper->viewRenderer->setNoRender(true); // Don't use (phtml) templates
$id = $this->_getParam('id', null);
$type = $this->_getParam('type');
Application_Model_Library::changePlaylist($id, $type);
}
public function editAction()
{
$id = $this->_getParam('id', null);
@ -241,7 +252,7 @@ class PlaylistController extends Zend_Controller_Action
Logging::info("Currently active {$type} {$obj_sess->id}");
if (in_array($obj_sess->id, $ids)) {
Logging::info("Deleting currently active {$type}");
Application_Model_Library::changePlaylist(null, $type);
// Application_Model_Library::changePlaylist(null, $type);
} else {
Logging::info("Not deleting currently active {$type}");
$obj = new $objInfo['className']($obj_sess->id);

View file

@ -82,7 +82,7 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
* @param string $module
* @return void
**/
public function setErrorPage($action, $controller = 'error', $module = null)
public function setErrorPage($action, $controller = 'error', $module = 'default')
{
$this->_errorPage = array('module' => $module,
'controller' => $controller,
@ -204,11 +204,8 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
$resourceName,
$request->getActionName())) {
/** Redirect to access denied page */
$this->getResponse()
->setHttpResponseCode(403)
->appendBody("You don't have permission to access this resource.")
->sendResponse();
// $this->denyAccess(); /* This results in a 404! */
$this->setErrorPage('error403');
$this->denyAccess(); /* This results in a 404! */
}
}
}

View file

@ -142,7 +142,8 @@ class Application_Service_CalendarService
if ($isRepeating) {
if ($populateInstance) {
$menu["edit"] = array(
"name" => _("Edit This Instance"),
// "name" => _("Edit This Instance"),
"name" => _("Edit Instance"),
"icon" => "edit",
"url" => $baseUrl . "Schedule/populate-repeating-show-instance-form"
);
@ -160,7 +161,8 @@ class Application_Service_CalendarService
);
$menu["edit"]["items"]["instance"] = array(
"name" => _("Edit This Instance"),
// "name" => _("Edit This Instance"),
"name" => _("Edit Instance"),
"icon" => "edit",
"url" => $baseUrl . "Schedule/populate-repeating-show-instance-form"
);
@ -188,12 +190,14 @@ class Application_Service_CalendarService
"items" => array());
$menu["del"]["items"]["single"] = array(
"name"=> _("Delete This Instance"),
// "name"=> _("Delete This Instance"),
"name"=> _("Delete Instance"),
"icon" => "delete",
"url" => $baseUrl."schedule/delete-show-instance");
$menu["del"]["items"]["following"] = array(
"name"=> _("Delete This Instance and All Following"),
// "name"=> _("Delete This Instance and All Following"),
"name"=> _("Delete Instance and All Following"),
"icon" => "delete",
"url" => $baseUrl."schedule/delete-show");
} elseif ($populateInstance) {