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;
|
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() {
|
public function publishDialogAction() {
|
||||||
$this->_helper->layout->disableLayout();
|
$this->_helper->layout->disableLayout();
|
||||||
|
|
||||||
|
|
||||||
|
if (!Billing::isStationPodcastAllowed()) {
|
||||||
|
$this->renderScript("podcast/featureupgrade-pane.phtml");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//This just spits out publish-dialog.phtml!
|
//This just spits out publish-dialog.phtml!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,12 @@ class PodcastController extends Zend_Controller_Action {
|
||||||
* Renders the Station podcast view
|
* Renders the Station podcast view
|
||||||
*/
|
*/
|
||||||
public function stationAction() {
|
public function stationAction() {
|
||||||
|
|
||||||
|
if (!Billing::isStationPodcastAllowed()) {
|
||||||
|
$this->render("featureupgrade-page");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$stationPodcastId = Application_Model_Preference::getStationPodcastId();
|
$stationPodcastId = Application_Model_Preference::getStationPodcastId();
|
||||||
$podcast = Application_Service_PodcastService::getPodcastById($stationPodcastId);
|
$podcast = Application_Service_PodcastService::getPodcastById($stationPodcastId);
|
||||||
$this->view->podcast = json_encode($podcast);
|
$this->view->podcast = json_encode($podcast);
|
||||||
|
|
|
@ -84,6 +84,7 @@ class Rest_PodcastController extends Zend_Rest_Controller
|
||||||
$podcast = Application_Service_PodcastService::createFromFeedUrl($requestData["url"]);
|
$podcast = Application_Service_PodcastService::createFromFeedUrl($requestData["url"]);
|
||||||
|
|
||||||
$path = 'podcast/podcast.phtml';
|
$path = 'podcast/podcast.phtml';
|
||||||
|
|
||||||
$this->view->podcast = $podcast;
|
$this->view->podcast = $podcast;
|
||||||
$this->_helper->json->sendJson(array(
|
$this->_helper->json->sendJson(array(
|
||||||
"podcast"=>json_encode($podcast),
|
"podcast"=>json_encode($podcast),
|
||||||
|
@ -176,10 +177,11 @@ class Rest_PodcastController extends Zend_Rest_Controller
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case HttpRequestType::GET:
|
case HttpRequestType::GET:
|
||||||
|
$path = 'podcast/podcast.phtml';
|
||||||
foreach($ids as $id) {
|
foreach($ids as $id) {
|
||||||
$responseBody[] = array(
|
$responseBody[] = array(
|
||||||
"podcast" => json_encode(Application_Service_PodcastService::getPodcastById($id)),
|
"podcast" => json_encode(Application_Service_PodcastService::getPodcastById($id)),
|
||||||
"html" => $this->view->render('podcast/podcast.phtml')
|
"html" => $this->view->render($path)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
break;
|
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>
|
||||||
|
|
||||||
|
|
|
@ -2870,14 +2870,14 @@ dt.block-display.info-block {
|
||||||
padding:350px 0 10px 0;
|
padding:350px 0 10px 0;
|
||||||
font-size:36px;
|
font-size:36px;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
color:#3e3e3e;
|
color: #8e8e8e;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
letter-spacing:-.3px;
|
letter-spacing:-.3px;
|
||||||
text-shadow: rgba(248,248,248,.3) 0 1px 0, rgba(0,0,0,.8) 0 -1px 0;
|
text-shadow: rgba(248,248,248,.3) 0 1px 0, rgba(0,0,0,.8) 0 -1px 0;
|
||||||
rgba(51,51,51,.9)
|
rgba(51,51,51,.9)
|
||||||
}
|
}
|
||||||
.error-content p {
|
.error-content p {
|
||||||
color: #272727;
|
color: #acacac;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -4287,3 +4287,50 @@ li .ui-state-hover {
|
||||||
float: right;
|
float: right;
|
||||||
width: 50%;
|
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;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue