diff --git a/airtime_mvc/application/configs/navigation.php b/airtime_mvc/application/configs/navigation.php index 42de99fe8..88c2a00ec 100644 --- a/airtime_mvc/application/configs/navigation.php +++ b/airtime_mvc/application/configs/navigation.php @@ -83,7 +83,21 @@ $pages = array( 'label' => _('Widgets'), 'module' => 'default', 'controller' => 'embeddablewidgets', - 'action' => 'index' + 'action' => 'player', + 'pages' => array( + array( + 'label' => _('Player'), + 'module' => 'default', + 'controller' => 'embeddablewidgets', + 'action' => 'player', + ), + array( + 'label' => _('Weekly Schedule'), + 'module' => 'default', + 'controller' => 'embeddablewidgets', + 'action' => 'schedule', + ) + ) ), array( 'label' => _('Help'), diff --git a/airtime_mvc/application/controllers/EmbeddablewidgetsController.php b/airtime_mvc/application/controllers/EmbeddablewidgetsController.php index 7685d5c94..4fc7c4023 100644 --- a/airtime_mvc/application/controllers/EmbeddablewidgetsController.php +++ b/airtime_mvc/application/controllers/EmbeddablewidgetsController.php @@ -8,8 +8,11 @@ class EmbeddableWidgetsController extends Zend_Controller_Action } - public function indexAction() + public function playerAction() { + $this->_helper->layout->setLayout("page-sub-menu"); + Zend_Layout::getMvcInstance()->assign('parent_page', 'Widgets'); + $CC_CONFIG = Config::getConfig(); $baseUrl = Application_Common_OsPath::getBaseDir(); $this->view->headLink()->appendStylesheet($baseUrl.'css/player-form.css?'.$CC_CONFIG['airtime_version']); @@ -27,6 +30,14 @@ class EmbeddableWidgetsController extends Zend_Controller_Action 1. Enable at least one MP3, AAC, or OGG stream under System -> Streams
2. Enable the Public Airtime API under System -> Preferences"); } + } + + public function scheduleAction() + { + $this->_helper->layout->setLayout("page-sub-menu"); + Zend_Layout::getMvcInstance()->assign('parent_page', 'Widgets'); + + $apiEnabled = Application_Model_Preference::GetAllow3rdPartyApi(); if (!$apiEnabled) { $this->view->weekly_schedule_error_msg = _("To use the embeddable weekly schedule widget you must:

diff --git a/airtime_mvc/application/layouts/scripts/page-sub-menu.phtml b/airtime_mvc/application/layouts/scripts/page-sub-menu.phtml index f28bcac3c..2318fe873 100644 --- a/airtime_mvc/application/layouts/scripts/page-sub-menu.phtml +++ b/airtime_mvc/application/layouts/scripts/page-sub-menu.phtml @@ -120,10 +120,11 @@
diff --git a/airtime_mvc/application/views/scripts/embeddablewidgets/index.phtml b/airtime_mvc/application/views/scripts/embeddablewidgets/index.phtml deleted file mode 100644 index 9d0ba2ae9..000000000 --- a/airtime_mvc/application/views/scripts/embeddablewidgets/index.phtml +++ /dev/null @@ -1,47 +0,0 @@ -
-

- Player - Weekly Schedule -
- -
- - - -
-

-
- player_error_msg; ?> - player_form; ?> - -
-
-
- -
- - - -

-
- -
- weekly_schedule_error_msg; ?> -
- -
-
weekly_schedule_error_msg)) echo "style=display:none"; ?>> - -
- -
- -
- - - Copy this code and paste it into your website's HTML to embed the weekly schedule in your site. - Adjust the height and width attributes to your desired size. -
-
-
diff --git a/airtime_mvc/application/views/scripts/embeddablewidgets/player.phtml b/airtime_mvc/application/views/scripts/embeddablewidgets/player.phtml new file mode 100644 index 000000000..e7af772ff --- /dev/null +++ b/airtime_mvc/application/views/scripts/embeddablewidgets/player.phtml @@ -0,0 +1,12 @@ +
+ + + +
+

+
+ player_error_msg; ?> + player_form; ?> + +
+
diff --git a/airtime_mvc/application/views/scripts/embeddablewidgets/schedule.phtml b/airtime_mvc/application/views/scripts/embeddablewidgets/schedule.phtml new file mode 100644 index 000000000..4f7ffbc87 --- /dev/null +++ b/airtime_mvc/application/views/scripts/embeddablewidgets/schedule.phtml @@ -0,0 +1,29 @@ +
+ + + +

+
+ +
+ weekly_schedule_error_msg; ?> +
+ +
+
weekly_schedule_error_msg)) echo "style=display:none"; ?>> + +
+ +
+ +
+ + +
+ Copy this code and paste it into your website's HTML to embed the weekly schedule in your site. + Adjust the height and width attributes to your desired size. +
+
+
+
diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index b9a9c4f24..e35c83156 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -3385,7 +3385,7 @@ dd .stream-status { #weekly-schedule-widget { margin: 0 auto; margin-bottom: 20px; - width: 50%; + width: 60%; } #widget-menu {