diff --git a/airtime_mvc/application/configs/ACL.php b/airtime_mvc/application/configs/ACL.php index 74be31809..52ba6fa7b 100644 --- a/airtime_mvc/application/configs/ACL.php +++ b/airtime_mvc/application/configs/ACL.php @@ -37,6 +37,7 @@ $ccAcl->add(new Zend_Acl_Resource('library')) ->add(new Zend_Acl_Resource('rest:show-image')) ->add(new Zend_Acl_Resource('rest:podcast')) ->add(new Zend_Acl_Resource('rest:podcast-episodes')) + ->add(new Zend_Acl_Resource('podcast')) ->add(new Zend_Acl_Resource('billing')) ->add(new Zend_Acl_Resource('thank-you')) ->add(new Zend_Acl_Resource('provisioning')) @@ -76,6 +77,7 @@ $ccAcl->allow('G', 'index') ->allow('H', 'rest:media') ->allow('H', 'rest:podcast') ->allow('H', 'rest:podcast-episodes') + ->allow('H', 'podcast') ->allow('H', 'preference', 'is-import-in-progress') ->allow('H', 'usersettings') ->allow('H', 'plupload') diff --git a/airtime_mvc/application/configs/navigation.php b/airtime_mvc/application/configs/navigation.php index e61ad2986..7ab7b5fb7 100644 --- a/airtime_mvc/application/configs/navigation.php +++ b/airtime_mvc/application/configs/navigation.php @@ -8,6 +8,13 @@ * the navigation container below. */ $pages = array( + array( + 'label' => ""._('My Podcast'), + 'module' => 'default', + 'controller' => 'podcast', + 'action' => 'station', + 'resource' => 'podcast' + ), array( 'label' => ""._('Radio Page'), 'uri' => '/', diff --git a/airtime_mvc/application/controllers/PodcastController.php b/airtime_mvc/application/controllers/PodcastController.php new file mode 100644 index 000000000..afc367880 --- /dev/null +++ b/airtime_mvc/application/controllers/PodcastController.php @@ -0,0 +1,35 @@ +view->headScript(); + AirtimeTableView::injectTableJavaScriptDependencies($headScript, $baseUrl, $CC_CONFIG['airtime_version']); + + $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_showbuilder.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + + $this->view->headScript()->appendFile($baseUrl.'js/airtime/widgets/table.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/podcast.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); + + $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/station_podcast.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/dashboard.css?'.$CC_CONFIG['airtime_version']); + } + + /** + * Renders the Station podcast view + */ + public function stationAction() { + $stationPodcastId = Application_Model_Preference::getStationPodcastId(); + $podcast = Application_Service_PodcastService::getPodcastById($stationPodcastId); + $this->view->podcast = json_encode($podcast); + $this->view->form = new Application_Form_StationPodcast(); + } + +} \ No newline at end of file diff --git a/airtime_mvc/application/forms/PodcastPreferences.php b/airtime_mvc/application/forms/PodcastPreferences.php index be8e84b39..a5706819b 100644 --- a/airtime_mvc/application/forms/PodcastPreferences.php +++ b/airtime_mvc/application/forms/PodcastPreferences.php @@ -3,28 +3,26 @@ class Application_Form_PodcastPreferences extends Zend_Form_SubForm { public function init() { - $this->setDecorators(array( - array('ViewScript', array('viewScript' => 'form/preferences_podcast.phtml')) - )); - $isPrivate = Application_Model_Preference::getStationPodcastPrivacy(); - $stationPodcastPrivacy = new Zend_Form_Element_Radio('stationPodcastPrivacy'); - $stationPodcastPrivacy->setLabel(_('My Podcast Feed Privacy')); + $stationPodcastPrivacy = new Zend_Form_Element_Radio("stationPodcastPrivacy"); + $stationPodcastPrivacy->setLabel(_('Feed Privacy')); $stationPodcastPrivacy->setMultiOptions(array( _("Public"), _("Private"), )); $stationPodcastPrivacy->setValue($isPrivate); + $stationPodcastPrivacy->setDecorators(array('ViewHelper', 'Label')); $this->addElement($stationPodcastPrivacy); $stationPodcast = PodcastQuery::create()->findOneByDbId(Application_Model_Preference::getStationPodcastId()); $url = $stationPodcast->getDbUrl(); - $feedUrl = new Zend_Form_Element_Text("stationPodcastFeedUrl:"); + $feedUrl = new Zend_Form_Element_Text("stationPodcastFeedUrl"); $feedUrl->setAttrib('class', 'input_text') ->setAttrib('disabled', 'disabled') ->setRequired(false) - ->setLabel(_("My Podcast Feed URL")) + ->setLabel(_("Feed URL")) ->setValue($url); + $feedUrl->setDecorators(array('ViewHelper', 'Label')); $this->addElement($feedUrl); } diff --git a/airtime_mvc/application/forms/Preferences.php b/airtime_mvc/application/forms/Preferences.php index e41361b6f..cb201cd2b 100644 --- a/airtime_mvc/application/forms/Preferences.php +++ b/airtime_mvc/application/forms/Preferences.php @@ -26,10 +26,6 @@ class Application_Form_Preferences extends Zend_Form $this->addSubForm($general_pref, 'preferences_general'); - // Station Podcast form - $podcastPreferences = new Application_Form_PodcastPreferences(); - $this->addSubForm($podcastPreferences, 'preferences_podcast'); - //tunein form $tuneinPreferences = new Application_Form_TuneInPreferences(); $this->addSubForm($tuneinPreferences, 'preferences_tunein'); diff --git a/airtime_mvc/application/forms/StationPodcast.php b/airtime_mvc/application/forms/StationPodcast.php new file mode 100644 index 000000000..e4e8ec9b6 --- /dev/null +++ b/airtime_mvc/application/forms/StationPodcast.php @@ -0,0 +1,11 @@ +addSubForm($podcastPreferences, 'preferences_podcast'); + } + +} \ No newline at end of file diff --git a/airtime_mvc/application/layouts/scripts/layout.phtml b/airtime_mvc/application/layouts/scripts/layout.phtml index bc60d7e30..bbd3d1572 100644 --- a/airtime_mvc/application/layouts/scripts/layout.phtml +++ b/airtime_mvc/application/layouts/scripts/layout.phtml @@ -99,7 +99,7 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= $disk = $partitions[0]; $used = $disk->totalSpace-$disk->totalFreeSpace; $total = $disk->totalSpace; - echo "var remainingDiskSpace = ".$disk->totalFreeSpace; + echo "var remainingDiskSpace = ".$disk->totalFreeSpace.";"; ?>