diff --git a/airtime_mvc/application/common/CORSHelper.php b/airtime_mvc/application/common/CORSHelper.php index fac6e3fdd..0375a702a 100644 --- a/airtime_mvc/application/common/CORSHelper.php +++ b/airtime_mvc/application/common/CORSHelper.php @@ -23,6 +23,7 @@ class CORSHelper return array("http://www.airtime.pro", "https://www.airtime.pro", "https://account.sourcefabric.com", + "https://account.sourcefabric.com:5001", "http://" . $_SERVER['SERVER_NAME'], "https://" . $_SERVER['SERVER_NAME']); } diff --git a/airtime_mvc/application/common/SecurityHelper.php b/airtime_mvc/application/common/SecurityHelper.php new file mode 100644 index 000000000..af4d712eb --- /dev/null +++ b/airtime_mvc/application/common/SecurityHelper.php @@ -0,0 +1,11 @@ +setTimezone($utcTimezone); - $utcDayStart = $weekStartDateTime->format("Y-m-d H:i:s"); + + // When querying for shows we need the start and end date range to have + // a time of "00:00". $utcDayStart is used below when querying for shows. + $utcDayStartDT = clone $weekStartDateTime; + $utcDayStartDT->setTime(0, 0, 0); + $utcDayStart = $utcDayStartDT->format("Y-m-d H:i:s"); $weekCounter = 0; while ($weekCounter < $maxNumOFWeeks) { for ($dayOfWeekCounter = 0; $dayOfWeekCounter < DAYS_PER_WEEK; $dayOfWeekCounter++) { @@ -94,7 +99,11 @@ class WidgetHelper //convert back to UTC to get the actual timestamp used for search. $weekStartDateTime->setTimezone($utcTimezone); - $utcDayEnd = $weekStartDateTime->format("Y-m-d H:i:s"); + // When querying for shows we need the start and end date range to have + // a time of "00:00". + $utcDayEndDT = clone $weekStartDateTime; + $utcDayEndDT->setTime(0, 0, 0); + $utcDayEnd = $utcDayEndDT->format("Y-m-d H:i:s"); $shows = Application_Model_Show::getNextShows($utcDayStart, "ALL", $utcDayEnd); $utcDayStart = $utcDayEnd; diff --git a/airtime_mvc/application/configs/navigation.php b/airtime_mvc/application/configs/navigation.php index 4a26366bf..6f4caf71e 100644 --- a/airtime_mvc/application/configs/navigation.php +++ b/airtime_mvc/application/configs/navigation.php @@ -36,6 +36,13 @@ $pages = array( 'action' => 'index', 'resource' => 'schedule' ), + array( + 'label' => _('Radio Page'), + 'uri' => '/', + 'resource' => '', + 'pages' => array( + ) + ), array( 'label' => _('System'), 'uri' => '#', @@ -81,7 +88,7 @@ $pages = array( 'resource' => 'listenerstat' ), array( - 'label' => _('Widgets'), + 'label' => _('Embeddable Widgets'), 'module' => 'default', 'controller' => 'embeddablewidgets', 'action' => 'index' diff --git a/airtime_mvc/application/controllers/EmbeddablewidgetsController.php b/airtime_mvc/application/controllers/EmbeddablewidgetsController.php index 3d3285d0a..7685d5c94 100644 --- a/airtime_mvc/application/controllers/EmbeddablewidgetsController.php +++ b/airtime_mvc/application/controllers/EmbeddablewidgetsController.php @@ -29,8 +29,8 @@ class EmbeddableWidgetsController extends Zend_Controller_Action } if (!$apiEnabled) { - $this->view->weekly_schedule_error_msg = _("To use the embeddable weekly schedule you must:

- 1. Enable the Public Airtime API under System -> Preferences"); + $this->view->weekly_schedule_error_msg = _("To use the embeddable weekly schedule widget you must:

+ Enable the Public Airtime API under System -> Preferences"); } } } diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php index 0578c46de..0ac3c199a 100644 --- a/airtime_mvc/application/models/Preference.php +++ b/airtime_mvc/application/models/Preference.php @@ -337,7 +337,7 @@ class Application_Model_Preference public static function GetAllow3rdPartyApi() { $val = self::getValue("third_party_api"); - return (strlen($val) == 0 ) ? "0" : $val; + return (strlen($val) == 0 ) ? "1" : $val; } public static function SetPhone($phone) diff --git a/airtime_mvc/application/views/scripts/embed/weekly-program.phtml b/airtime_mvc/application/views/scripts/embed/weekly-program.phtml index 1ec3e1f1c..8eb1118b7 100644 --- a/airtime_mvc/application/views/scripts/embed/weekly-program.phtml +++ b/airtime_mvc/application/views/scripts/embed/weekly-program.phtml @@ -39,11 +39,15 @@ $activeClass = $this->currentDayOfMonth == $data["dayOfMonth"] ? "active" : ""; echo "
"; - foreach ($data["shows"] as $show => $showData) { - echo "
"; - echo "
".$showData["show_start_hour"].' - '.$showData["show_end_hour"]."
"; - echo "
".$showData["name"]."
"; - echo "
"; + if (count($data["shows"]) == 0) { + echo "
Looks like there are no shows scheduled on this day.
"; + } else { + foreach ($data["shows"] as $show => $showData) { + echo "
"; + echo "
" . $showData["show_start_hour"] . ' - ' . $showData["show_end_hour"] . "
"; + echo "
" . $showData["name"] . "
"; + echo "
"; + } } echo "
"; }?> diff --git a/airtime_mvc/application/views/scripts/embeddablewidgets/index.phtml b/airtime_mvc/application/views/scripts/embeddablewidgets/index.phtml index b132d1cb1..9d0ba2ae9 100644 --- a/airtime_mvc/application/views/scripts/embeddablewidgets/index.phtml +++ b/airtime_mvc/application/views/scripts/embeddablewidgets/index.phtml @@ -1,5 +1,5 @@
-

+

Player Weekly Schedule
@@ -29,17 +29,19 @@ weekly_schedule_error_msg; ?> -
weekly_schedule_error_msg)) echo "style=display:none"; ?>> - -
- -
+
+
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. -
+
+ + + 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/index/index.phtml b/airtime_mvc/application/views/scripts/index/index.phtml index 84e991722..8d8b22b6f 100644 --- a/airtime_mvc/application/views/scripts/index/index.phtml +++ b/airtime_mvc/application/views/scripts/index/index.phtml @@ -9,13 +9,21 @@ echo ""; } ?> +
+ + Login + + +
+
+
-

stationName ?>

-

stationDescription ?>

+

escape($this->stationName) ?>

+

escape($this->stationDescription) ?>

@@ -35,12 +43,11 @@ $(document).ready(function(){ $("#player_iframe").load(function () { - $("#player_iframe").contents().find('.bottom_bar').append(""); $("#player_iframe").contents().find('.bottom_bar').append("
"); $("#player_iframe").contents().find('.bottom_bar').append("
"); - $("#player_iframe").contents().find('.bottom_bar .button').not('.login_btn').click(function(){ + $("#player_iframe").contents().find('.bottom_bar .button').click(function(){ var tab_id = $(this).attr('data-tab'); $("#player_iframe").contents().find('.bottom_bar .button').removeClass('current'); diff --git a/airtime_mvc/application/views/scripts/systemstatus/index.phtml b/airtime_mvc/application/views/scripts/systemstatus/index.phtml index f8f43104d..ec68dfd5e 100644 --- a/airtime_mvc/application/views/scripts/systemstatus/index.phtml +++ b/airtime_mvc/application/views/scripts/systemstatus/index.phtml @@ -19,8 +19,9 @@ $r2 = array_reduce($externalServices, "booleanReduce", true); $result = $r1 && $r2; ?> - + + @@ -64,7 +65,7 @@ + */?> diff --git a/airtime_mvc/public/css/embed/weekly-schedule-widget-basic.css b/airtime_mvc/public/css/embed/weekly-schedule-widget-basic.css index c62878204..2985fa6f7 100644 --- a/airtime_mvc/public/css/embed/weekly-schedule-widget-basic.css +++ b/airtime_mvc/public/css/embed/weekly-schedule-widget-basic.css @@ -10,7 +10,6 @@ body { max-width: 750px; /*margin: 0 auto;*/ margin-bottom: 140px; - padding: 10px; position: absolute; /*left: 50%; margin-left: -380px;*/ @@ -25,7 +24,18 @@ body { list-style: none; padding-left: 0px; margin: 0px; - background: rgba(170, 170, 170, 0.9); + background: rgba(53, 53, 53, 0.9); + + -moz-border-top-left-radius: 4px; + -moz-border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + + -webkit-box-shadow: 0 3px 5px rgba(0,0,0,0.1) inset,0 1px 0 rgba(255,255,255,0.1),0 0 1px #000 inset; + -moz-box-shadow: 0 3px 5px rgba(0,0,0,0.1) inset,0 1px 0 rgba(255,255,255,0.1),0 0 1px #000 inset; + box-shadow: 0 3px 5px rgba(0,0,0,0.1) inset,0 1px 0 rgba(255,255,255,0.1),0 0 1px #000 inset; } .schedule .tabs li { @@ -60,6 +70,7 @@ body { background: rgba(53, 53, 53, 0.9); max-height: 0px; transition: max-height 2s ease; + height: 290px; overflow-y: auto; overflow-x: hidden; @@ -68,7 +79,11 @@ body { } .schedule.current .schedule_content { - max-height: 300px; + max-height: 290px; +} + +.tab_content.current ul { +background: rgba(53, 53, 53, 1.0); } /*.schedule_content table { @@ -86,8 +101,8 @@ body { display: none; font-size: 17px; text-align: left; - text-transform: uppercase; padding: 10px 30px; + border-top: 1px solid rgba(255, 255, 255, 0.1); } .schedule_item.active { @@ -99,6 +114,13 @@ body { padding-bottom: 10px; } +.empty-schedule { + text-transform: none; + text-align: center; + color: #aaaaaa; + line-height: 240px; +} + .schedule_item div.time_grid { /*padding-right: 10px;*/ width: 20%; @@ -117,10 +139,19 @@ body { } .weekly-schedule-widget-footer { - border-top: 1px solid #aaaaaa; + border-top: 1px solid rgba(255, 255, 255, 0.1); text-align: right; - padding: 4px 16px; + font-size: 11px; + padding: 16px 16px; background: rgba(53, 53, 53, 0.9); + + -moz-border-bottom-left-radius: 4px; + -moz-border-bottom-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + } .weekly-schedule-widget-footer a { diff --git a/airtime_mvc/public/css/embed/weekly-schedule-widget.css b/airtime_mvc/public/css/embed/weekly-schedule-widget.css index 622c2699a..1e603f306 100644 --- a/airtime_mvc/public/css/embed/weekly-schedule-widget.css +++ b/airtime_mvc/public/css/embed/weekly-schedule-widget.css @@ -57,7 +57,7 @@ body { .schedule_content { background: rgba(0, 0, 0, 0.3); - max-height: 0px; + max-height: 290px; transition: max-height 2s ease; overflow-y: auto; @@ -88,6 +88,11 @@ body { padding-bottom: 10px; } +.empty-schedule { + text-transform: none; + text-align: center; +} + .schedule_item div.time_grid { /*padding-right: 10px;*/ width: 20%; diff --git a/airtime_mvc/public/css/radio-page/img/background.png b/airtime_mvc/public/css/radio-page/img/background-blue.png similarity index 100% rename from airtime_mvc/public/css/radio-page/img/background.png rename to airtime_mvc/public/css/radio-page/img/background-blue.png diff --git a/airtime_mvc/public/css/radio-page/img/background-testing-2.jpg b/airtime_mvc/public/css/radio-page/img/background-testing-2.jpg new file mode 100644 index 000000000..2bd078737 Binary files /dev/null and b/airtime_mvc/public/css/radio-page/img/background-testing-2.jpg differ diff --git a/airtime_mvc/public/css/radio-page/img/background-testing-3.jpg b/airtime_mvc/public/css/radio-page/img/background-testing-3.jpg new file mode 100644 index 000000000..8564e6069 Binary files /dev/null and b/airtime_mvc/public/css/radio-page/img/background-testing-3.jpg differ diff --git a/airtime_mvc/public/css/radio-page/img/background-testing.jpg b/airtime_mvc/public/css/radio-page/img/background-testing.jpg new file mode 100644 index 000000000..2298a5dba Binary files /dev/null and b/airtime_mvc/public/css/radio-page/img/background-testing.jpg differ diff --git a/airtime_mvc/public/css/radio-page/img/background.jpg b/airtime_mvc/public/css/radio-page/img/background.jpg new file mode 100644 index 000000000..1f420424e Binary files /dev/null and b/airtime_mvc/public/css/radio-page/img/background.jpg differ diff --git a/airtime_mvc/public/css/radio-page/img/login-small.png b/airtime_mvc/public/css/radio-page/img/login-small.png new file mode 100644 index 000000000..1f38b22b0 Binary files /dev/null and b/airtime_mvc/public/css/radio-page/img/login-small.png differ diff --git a/airtime_mvc/public/css/radio-page/radio-page.css b/airtime_mvc/public/css/radio-page/radio-page.css index 924fffe21..635c9bc3c 100644 --- a/airtime_mvc/public/css/radio-page/radio-page.css +++ b/airtime_mvc/public/css/radio-page/radio-page.css @@ -1,5 +1,5 @@ html { - background: url("img/background.png") no-repeat center center fixed; + background: url("img/background-testing-3.jpg") no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; @@ -26,6 +26,34 @@ body { margin: 40px 0px 0px 60px; } +.login-btn { + float: right; + margin-right: 60px; + margin-top: 40px; + display:inline-block; + background-color: #000000; + opacity: 0.5; + padding: 10px; +} + +.login-btn a { + color: #fff; + text-decoration: none; +} + +.login-btn span { + display: inline-block; + vertical-align: middle; +} + +span.login-img { + background: url('img/login-small.png') no-repeat center -25px; + display: inline-block; + vertical-align: middle; + width: 25px; + height: 25px; +} + #schedule_iframe, .tab_content { color: #fff; text-align: center; @@ -134,6 +162,19 @@ input[type="submit"]:hover { margin: 20px 0px; } + .login-btn { + float: right; + margin-right: 0px; + margin-top: 0px; + position: absolute; + top: 15px; + right: 5px; + } + + span.login-img { + display:none; + } + .tab_content { margin-top: 0px; width: auto; diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index c8b8694b8..a95b3b85e 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -332,7 +332,7 @@ select { width: 40%; } } -@media screen and (max-width: 863px) { +@media screen and (max-width: 1100px) { #nav { height: inherit; overflow-y: visible; @@ -3264,11 +3264,13 @@ dd .stream-status { #weekly-schedule-widget { margin: 0 auto; + margin-bottom: 20px; width: 50%; } #widget-menu { margin: 0 auto; + margin-bottom: 20px; width: 40%; } @@ -3278,14 +3280,19 @@ dd .stream-status { font-size: 14px; } +#player-widget { + margin-bottom: 20px; +} + #weekly-schedule-widget label { font-weight: bold; } -.blah { +.schedule_iframe_wrapper { width: 100%; float: left; text-align: center; + padding: 10px; } #schedule_iframe {
"> + ?>" Try running sudo apt-get install php5-pgsql "> "> + ?>" Make sure you aren't missing any of the Postgres dependencies in the table above. If your dependencies check out, make sure your database configuration settings in /etc/airtime.conf are correct and the Airtime database was installed correctly. @@ -100,7 +101,7 @@ "> + ?>" Make sure RabbitMQ is installed correctly, and that your settings in /etc/airtime/airtime.conf are correct. Try using sudo rabbitmqctl list_users and sudo rabbitmqctl list_vhosts to see if the airtime user (or your custom RabbitMQ user) exists, then checking that @@ -121,7 +122,7 @@ "> + ?>" Check that the airtime-media-monitor service is installed correctly in /etc/init, and ensure that it's running with
initctl list | grep airtime-media-monitor
@@ -141,7 +142,7 @@
"> + ?>" Check that the airtime-playout service is installed correctly in /etc/init, and ensure that it's running with
initctl list | grep airtime-playout
@@ -161,7 +162,7 @@
"> + ?>" Check that the airtime-liquidsoap service is installed correctly in /etc/init, and ensure that it's running with
initctl list | grep airtime-liquidsoap
@@ -171,6 +172,7 @@ ?>