SAAS-1148: Add station podcast to Radio Page

Skeleton is done. Download link works. Play link not yet done.
This commit is contained in:
drigato 2015-10-26 15:24:33 -04:00
parent 7f05d5c05e
commit 73e7e6e021
4 changed files with 26 additions and 5 deletions

View file

@ -40,6 +40,12 @@ class IndexController extends Zend_Controller_Action
}
$this->view->displayLoginButton = $displayRadioPageLoginButtonValue;
//station feed episodes
$podcastEpisodesService = new Application_Service_PodcastEpisodeService();
$stationPodcastId = Application_Model_Preference::getStationPodcastId();
$episodes = $podcastEpisodesService->getPodcastEpisodes($stationPodcastId);
$this->view->episodes = json_encode($episodes);
}
public function mainAction()

View file

@ -52,6 +52,16 @@ document.getElementById(id).width= (newwidth) + "px";
</form>
</div>
<div id="tab-4" class="station_rss tab_content">
<script type="text/javascript">
$.each(<?php echo $this->episodes ?>, function(index, value){
$("#tab-4").append("<div>"+value.track_metadata.artist_name+" - "+value.track_metadata.track_title+
" <a id='rss-download-link' href='"+value.download_url+"'>Download</a>" +
" <a id='rss-play-link' href='#'>Play</a></div>");
});
</script>
</div>
<iframe id="player_iframe" frameborder="0" width="100%" style="bottom:0px; left:0px; position:fixed; right:0px;" src=<?php echo $this->stationUrl."embed/player?stream=auto&style=premium";?>></iframe>
</div>
@ -60,6 +70,7 @@ document.getElementById(id).width= (newwidth) + "px";
$(document).ready(function(){
$("#player_iframe").load(function () {
$("#player_iframe").contents().find('.bottom_bar').append("<div class='station_rss_btn button' data-tab='tab-4'></div>");
$("#player_iframe").contents().find('.bottom_bar').append("<div class='about_us_btn button' data-tab='tab-2'></div>");
$("#player_iframe").contents().find('.bottom_bar').append("<div class='schedule_btn button current' data-tab='tab-1'></div>");