diff --git a/airtime_mvc/application/common/Billing.php b/airtime_mvc/application/common/Billing.php index 2dbfafa9a..57c8e3cf3 100644 --- a/airtime_mvc/application/common/Billing.php +++ b/airtime_mvc/application/common/Billing.php @@ -374,4 +374,13 @@ class Billing return 0; } } + + public static function isStationPodcastAllowed() { + $planLevel = Application_Model_Preference::GetPlanLevel(); + if ($planLevel == "hobbyist") { + return false; + } else { + return true; + } + } } diff --git a/airtime_mvc/application/controllers/LibraryController.php b/airtime_mvc/application/controllers/LibraryController.php index 06139e93f..221271d81 100644 --- a/airtime_mvc/application/controllers/LibraryController.php +++ b/airtime_mvc/application/controllers/LibraryController.php @@ -446,6 +446,12 @@ class LibraryController extends Zend_Controller_Action public function publishDialogAction() { $this->_helper->layout->disableLayout(); + + if (!Billing::isStationPodcastAllowed()) { + $this->renderScript("podcast/featureupgrade-pane.phtml"); + } + + //This just spits out publish-dialog.phtml! } } diff --git a/airtime_mvc/application/controllers/PodcastController.php b/airtime_mvc/application/controllers/PodcastController.php index afc367880..6c1fd05c3 100644 --- a/airtime_mvc/application/controllers/PodcastController.php +++ b/airtime_mvc/application/controllers/PodcastController.php @@ -26,6 +26,12 @@ class PodcastController extends Zend_Controller_Action { * Renders the Station podcast view */ public function stationAction() { + + if (!Billing::isStationPodcastAllowed()) { + $this->render("featureupgrade-page"); + return; + } + $stationPodcastId = Application_Model_Preference::getStationPodcastId(); $podcast = Application_Service_PodcastService::getPodcastById($stationPodcastId); $this->view->podcast = json_encode($podcast); diff --git a/airtime_mvc/application/modules/rest/controllers/PodcastController.php b/airtime_mvc/application/modules/rest/controllers/PodcastController.php index 5acf17674..9035297bf 100644 --- a/airtime_mvc/application/modules/rest/controllers/PodcastController.php +++ b/airtime_mvc/application/modules/rest/controllers/PodcastController.php @@ -84,6 +84,7 @@ class Rest_PodcastController extends Zend_Rest_Controller $podcast = Application_Service_PodcastService::createFromFeedUrl($requestData["url"]); $path = 'podcast/podcast.phtml'; + $this->view->podcast = $podcast; $this->_helper->json->sendJson(array( "podcast"=>json_encode($podcast), @@ -176,10 +177,11 @@ class Rest_PodcastController extends Zend_Rest_Controller } break; case HttpRequestType::GET: + $path = 'podcast/podcast.phtml'; foreach($ids as $id) { $responseBody[] = array( "podcast" => json_encode(Application_Service_PodcastService::getPodcastById($id)), - "html" => $this->view->render('podcast/podcast.phtml') + "html" => $this->view->render($path) ); } break; diff --git a/airtime_mvc/application/views/scripts/podcast/featureupgrade-page.phtml b/airtime_mvc/application/views/scripts/podcast/featureupgrade-page.phtml new file mode 100644 index 000000000..afd5a7e3e --- /dev/null +++ b/airtime_mvc/application/views/scripts/podcast/featureupgrade-page.phtml @@ -0,0 +1,13 @@ + + +
+ + +
diff --git a/airtime_mvc/application/views/scripts/podcast/featureupgrade-pane.phtml b/airtime_mvc/application/views/scripts/podcast/featureupgrade-pane.phtml new file mode 100644 index 000000000..c645fa36d --- /dev/null +++ b/airtime_mvc/application/views/scripts/podcast/featureupgrade-pane.phtml @@ -0,0 +1,22 @@ + + + + +
+ +
+
+ +
+
+
+ diff --git a/airtime_mvc/application/views/scripts/podcast/featureupgrade.phtml b/airtime_mvc/application/views/scripts/podcast/featureupgrade.phtml new file mode 100644 index 000000000..492e4bc9a --- /dev/null +++ b/airtime_mvc/application/views/scripts/podcast/featureupgrade.phtml @@ -0,0 +1,26 @@ + + +
+

Get a built-in podcast for your radio station.

+

Upgrade to unlock this feature today. Podcast hosting is included on all Starter, Plus, and Premium plans.

+ +

With our built-in podcast, you can: +

+

+ + " class="upgrade-cta-button">Upgrade today! +
+ + diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index c645ce5e2..528079997 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -2870,14 +2870,14 @@ dt.block-display.info-block { padding:350px 0 10px 0; font-size:36px; font-weight:bold; - color:#3e3e3e; + color: #8e8e8e; text-align:center; letter-spacing:-.3px; text-shadow: rgba(248,248,248,.3) 0 1px 0, rgba(0,0,0,.8) 0 -1px 0; rgba(51,51,51,.9) } .error-content p { - color: #272727; + color: #acacac; font-size: 16px; text-align:center; margin: 0; @@ -4287,3 +4287,50 @@ li .ui-state-hover { float: right; width: 50%; } + +#upgrade-feature-locked { + margin: 0 auto; + width: 50%; + padding: 50px; + z-index: 99999; +} +#upgrade-feature-locked h2 { + font-size: 26px; +} +#upgrade-feature-locked h3 { + margin: 0px; + padding: 0px; + margin-bottom: 10px; +} + +/** Override overzealous CSS rules :-( */ +#upgrade-feature-locked ul, #upgrade-feature-locked li { + float: initial; + list-style-type: disc; +} +#upgrade-feature-locked li { + display: list-item; +} +#upgrade-feature-locked p, #upgrade-feature-locked li { + color: #f0f0f0; + font-size: 14px; + margin-top: 10px; + list-style-type: disc; +} + +.upgrade-cta-button { + background-color:#e76400; + margin: 0 auto; + padding: 20px; + border-radius: 3px; + width: 140px; + font-size: 18px; + display: block; + text-decoration: none; + text-align: center; + color: #f0f0f0; +} +.upgrade-cta-button a { + text-decoration: none; + color: #f0f0f0; +}