Restrict podcast hosting for some plans. Fixed error page colours.
This commit is contained in:
parent
ef1a57459c
commit
c5d9dfd93d
8 changed files with 134 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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!
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: asantoni
|
||||
* Date: 17/11/15
|
||||
* Time: 4:31 PM
|
||||
*/
|
||||
?>
|
||||
|
||||
<div class="content-pane" style="width: 100%">
|
||||
<?php require(__DIR__."/featureupgrade.phtml"); ?>
|
||||
|
||||
</div>
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: asantoni
|
||||
* Date: 17/11/15
|
||||
* Time: 4:31 PM
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php require(__DIR__."/featureupgrade.phtml"); ?>
|
||||
|
||||
<div class="angular_wrapper" ng-controller="Publish">
|
||||
|
||||
<div class="btn-toolbar clearfix" style="position: absolute; bottom: 4px; right: 4px">
|
||||
<div class="btn-group pull-right">
|
||||
<button ng-click="discard()" class="btn" type="button" name="close">
|
||||
<?php echo _("Close") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: asantoni
|
||||
* Date: 17/11/15
|
||||
* Time: 2:32 PM
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="upgrade-feature-locked">
|
||||
<h2>Get a built-in podcast for your radio station.</h2>
|
||||
<h3>Upgrade to unlock this feature today. Podcast hosting is included on all Starter, Plus, and Premium plans.</h3>
|
||||
|
||||
<p>With our built-in podcast, you can:
|
||||
<ul>
|
||||
<li>Share your own uploads through your podcast feed for on-demand listening.</li>
|
||||
<li>Invite your fans to listen to your podcast on your Radio Page.</li>
|
||||
<li>Publish tracks to both SoundCloud and your station podcast with one click.</li>
|
||||
<li>Reach more listeners, both offline and mobile with your radio podcast.</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<a href="<?php echo(Application_Common_HTTPHelper::getStationUrl() . "billing/upgrade");?>" class="upgrade-cta-button">Upgrade today!</a>
|
||||
</div>
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue