Merge branch 'saas-dev' of github.com:sourcefabric/Airtime into saas-dev
This commit is contained in:
commit
6251fd62d5
17 changed files with 199 additions and 257 deletions
|
@ -18,7 +18,7 @@ class Application_Common_Timezone
|
|||
'UTC' => DateTimeZone::UTC
|
||||
);
|
||||
|
||||
$tzlist = array();
|
||||
$tzlist = array(NULL => "Use station default");
|
||||
|
||||
foreach ($regions as $name => $mask) {
|
||||
$ids = DateTimeZone::listIdentifiers($mask);
|
||||
|
|
|
@ -24,95 +24,6 @@ class LibraryController extends Zend_Controller_Action
|
|||
public function indexAction()
|
||||
{
|
||||
$this->_redirect("showbuilder");
|
||||
// $CC_CONFIG = Config::getConfig();
|
||||
//
|
||||
// $request = $this->getRequest();
|
||||
// $baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
//
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/blockui/jquery.blockUI.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/contextmenu/jquery.contextMenu.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/datatables/js/jquery.dataTables.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.pluginAPI.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.ColVis.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.colReorder.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.FixedColumns.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.columnFilter.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
//
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/library.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/events/library_playlistbuilder.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
//
|
||||
// $this->view->headLink()->appendStylesheet($baseUrl.'css/media_library.css?'.$CC_CONFIG['airtime_version']);
|
||||
// $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.contextMenu.css?'.$CC_CONFIG['airtime_version']);
|
||||
// $this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/ColVis.css?'.$CC_CONFIG['airtime_version']);
|
||||
// $this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/dataTables.colReorder.min.css?'.$CC_CONFIG['airtime_version']);
|
||||
// $this->view->headLink()->appendStylesheet($baseUrl.'css/waveform.css?'.$CC_CONFIG['airtime_version']);
|
||||
//
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/spl.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/airtime/playlist/smart_blockbuilder.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
//
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/observer/observer.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/config.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/curves.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/fades.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/local_storage.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/controls.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/playout.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/track_render.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/track.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/time_scale.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/playlist.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
//
|
||||
// //arbitrary attributes need to be allowed to set an id for the templates.
|
||||
// $this->view->headScript()->setAllowArbitraryAttributes(true);
|
||||
// //$this->view->headScript()->appendScript(file_get_contents(APPLICATION_PATH.'/../public/js/waveformplaylist/templates/bottombar.tpl'),
|
||||
// // 'text/template', array('id' => 'tpl_playlist_cues', 'noescape' => true));
|
||||
//
|
||||
// $this->view->headLink()->appendStylesheet($baseUrl.'css/playlist_builder.css?'.$CC_CONFIG['airtime_version']);
|
||||
//
|
||||
// try {
|
||||
//
|
||||
// $obj_sess = new Zend_Session_Namespace(UI_PLAYLISTCONTROLLER_OBJ_SESSNAME);
|
||||
// if (isset($obj_sess->id)) {
|
||||
// $objInfo = Application_Model_Library::getObjInfo($obj_sess->type);
|
||||
// $obj = new $objInfo['className']($obj_sess->id);
|
||||
// $userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
// $user = new Application_Model_User($userInfo->id);
|
||||
// $isAdminOrPM = $user->isUserType(array(UTYPE_SUPERADMIN, UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
|
||||
//
|
||||
// if ($isAdminOrPM || $obj->getCreatorId() == $userInfo->id) {
|
||||
// $this->view->obj = $obj;
|
||||
// if ($obj_sess->type == "block") {
|
||||
// $form = new Application_Form_SmartBlockCriteria();
|
||||
// $form->startForm($obj_sess->id);
|
||||
// $this->view->form = $form;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// $formatter = new LengthFormatter($obj->getLength());
|
||||
// $this->view->length = $formatter->format();
|
||||
// $this->view->type = $obj_sess->type;
|
||||
// }
|
||||
//
|
||||
// //get user settings and determine if we need to hide
|
||||
// // or show the playlist editor
|
||||
// $showPlaylist = false;
|
||||
// $data = Application_Model_Preference::getLibraryScreenSettings();
|
||||
// if (!is_null($data)) {
|
||||
// if ($data["playlist"] == "true") {
|
||||
// $showPlaylist = true;
|
||||
// }
|
||||
// }
|
||||
// $this->view->showPlaylist = $showPlaylist;
|
||||
// } catch (PlaylistNotFoundException $e) {
|
||||
// $this->playlistNotFound($obj_sess->type);
|
||||
// } catch (Exception $e) {
|
||||
// $this->playlistNotFound($obj_sess->type);
|
||||
// Logging::info($e->getMessage());
|
||||
// //$this->playlistUnknownError($e);
|
||||
// }
|
||||
}
|
||||
|
||||
protected function playlistNotFound($p_type)
|
||||
|
|
|
@ -51,8 +51,14 @@ class LocaleController extends Zend_Controller_Action
|
|||
//library/events/library_showbuilder.js
|
||||
//already in library/events/library_playlistbuilder.js
|
||||
"Please select a cursor position on timeline." => _("Please select a cursor position on timeline."),
|
||||
"You haven't added any " => _("You haven't added any "),
|
||||
"Learn about " => _("Learn about "),
|
||||
"You haven't added any tracks" => _("You haven't added any tracks"),
|
||||
"You haven't added any playlists" => _("You haven't added any playlists"),
|
||||
"You haven't added any smart blocks" => _("You haven't added any smart blocks"),
|
||||
"You haven't added any webstreams" => _("You haven't added any webstreams"),
|
||||
"Learn about tracks" => _("Learn about tracks"),
|
||||
"Learn about playlists" => _("Learn about playlists"),
|
||||
"Learn about smart blocks" => _("Learn about smart blocks"),
|
||||
"Learn about webstreams" => _("Learn about webstreams"),
|
||||
"Click 'New' to create one." => _("Click 'New' to create one."),
|
||||
//"Adding 1 Item" => _("Adding 1 Item"),
|
||||
//"Adding %s Items" => _("Adding %s Items"),
|
||||
|
|
|
@ -204,7 +204,11 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
|
|||
$resourceName,
|
||||
$request->getActionName())) {
|
||||
/** Redirect to access denied page */
|
||||
$this->denyAccess();
|
||||
$this->getResponse()
|
||||
->setHttpResponseCode(403)
|
||||
->appendBody("You don't have permission to access this resource.")
|
||||
->sendResponse();
|
||||
// $this->denyAccess(); /* This results in a 404! */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,11 +121,14 @@ class Application_Form_EditUser extends Zend_Form
|
|||
$locale->setValue(Application_Model_Preference::GetUserLocale($currentUserId));
|
||||
$locale->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($locale);
|
||||
|
||||
|
||||
$stationTz = Application_Model_Preference::GetTimezone($currentUserId);
|
||||
$userTz = Application_Model_Preference::GetUserTimezone($currentUserId);
|
||||
|
||||
$timezone = new Zend_Form_Element_Select("cu_timezone");
|
||||
$timezone->setLabel(_("Interface Timezone:"));
|
||||
$timezone->setMultiOptions(Application_Common_Timezone::getTimezones());
|
||||
$timezone->setValue(Application_Model_Preference::GetUserTimezone($currentUserId));
|
||||
$timezone->setValue($userTz == $stationTz ? null : $userTz);
|
||||
$timezone->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($timezone);
|
||||
|
||||
|
|
|
@ -37,19 +37,17 @@ class Application_Form_Login extends Zend_Form
|
|||
));
|
||||
|
||||
// Add username element
|
||||
$this->addElement('text', 'username', array(
|
||||
'label' => _('Username:'),
|
||||
'class' => 'input_text',
|
||||
'required' => true,
|
||||
'value' => (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1)?'admin':'',
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
'NotEmpty',
|
||||
),
|
||||
'decorators' => array(
|
||||
'ViewHelper'
|
||||
)
|
||||
));
|
||||
$username = new Zend_Form_Element_Text("username");
|
||||
$username->setLabel(_('Username:'))
|
||||
->setAttribs(array(
|
||||
'autofocus' => 'true',
|
||||
'class' => 'input_text',
|
||||
'required' => 'true'))
|
||||
->setValue((isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1)?'admin':'')
|
||||
->addFilter('StringTrim')
|
||||
->setDecorators(array('ViewHelper'))
|
||||
->setValidators(array('NotEmpty'));
|
||||
$this->addElement($username);
|
||||
|
||||
// Add password element
|
||||
$this->addElement('password', 'password', array(
|
||||
|
|
|
@ -480,10 +480,6 @@ class Application_Model_Preference
|
|||
|
||||
public static function SetUserTimezone($timezone = null)
|
||||
{
|
||||
// When a new user is created they will get the default timezone
|
||||
// setting which the admin sets on preferences page
|
||||
if (is_null($timezone))
|
||||
$timezone = self::GetDefaultTimezone();
|
||||
self::setValue("user_timezone", $timezone, true);
|
||||
}
|
||||
|
||||
|
@ -523,10 +519,10 @@ class Application_Model_Preference
|
|||
public static function GetUserLocale()
|
||||
{
|
||||
$locale = self::getValue("user_locale", true);
|
||||
if (!$locale) {
|
||||
// empty() checks for null and empty strings - more robust than !val
|
||||
if (empty($locale)) {
|
||||
return self::GetDefaultLocale();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return $locale;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ class Application_Service_CalendarService
|
|||
|
||||
$menu["schedule"] = array(
|
||||
// "name"=> _("Add / Remove Content"),
|
||||
"name" => _("Schedule Show"),
|
||||
"name" => _("Schedule Tracks"),
|
||||
"icon" => "add-remove-content",
|
||||
"url" => $baseUrl."showbuilder/builder-dialog/");
|
||||
}
|
||||
|
|
|
@ -68,10 +68,8 @@
|
|||
</form>
|
||||
</div>
|
||||
<H2><?php echo _("Recent Uploads")?></H2>
|
||||
<div class="dataTables_scrolling">
|
||||
<table id="recent_uploads_table" class="datatable lib-content ui-widget ui-widget-content block-shadow"
|
||||
cellpadding="0" cellspacing="0"></table>
|
||||
</div>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue