Merge branch 'saas-dev-publishing' of https://github.com/sourcefabric/Airtime into saas-dev-publishing
This commit is contained in:
commit
8a03892ff8
8 changed files with 99 additions and 65 deletions
|
@ -55,8 +55,16 @@ class PreferenceController extends Zend_Controller_Action
|
|||
// Refresh the download key when enabling privacy
|
||||
Application_Model_Preference::setStationPodcastDownloadKey();
|
||||
}
|
||||
|
||||
// Append sharing token (download key) to Station podcast URL
|
||||
$stationPodcast = PodcastQuery::create()->findOneByDbId(Application_Model_Preference::getStationPodcastId());
|
||||
$key = Application_Model_Preference::getStationPodcastDownloadKey();
|
||||
$url = Application_Common_HTTPHelper::getStationUrl() .
|
||||
(((int) $values["stationPodcastPrivacy"]) ? "feeds/station-rss?sharing_token=$key" : "feeds/station-rss");
|
||||
$stationPodcast->setDbUrl($url)->save();
|
||||
Application_Model_Preference::setStationPodcastPrivacy($values["stationPodcastPrivacy"]);
|
||||
|
||||
|
||||
$logoUploadElement = $form->getSubForm('preferences_general')->getElement('stationLogo');
|
||||
$logoUploadElement->receive();
|
||||
$imagePath = $logoUploadElement->getFileName();
|
||||
|
|
|
@ -17,8 +17,8 @@ class Application_Form_PodcastPreferences extends Zend_Form_SubForm {
|
|||
$stationPodcastPrivacy->setValue($isPrivate);
|
||||
$this->addElement($stationPodcastPrivacy);
|
||||
|
||||
$key = Application_Model_Preference::getStationPodcastDownloadKey();
|
||||
$url = Application_Common_HTTPHelper::getStationUrl()."feeds/station-rss".($isPrivate ? "?sharing_token=$key" : "");
|
||||
$stationPodcast = PodcastQuery::create()->findOneByDbId(Application_Model_Preference::getStationPodcastId());
|
||||
$url = $stationPodcast->getDbUrl();
|
||||
$feedUrl = new Zend_Form_Element_Text("stationPodcastFeedUrl:");
|
||||
$feedUrl->setAttrib('class', 'input_text')
|
||||
->setAttrib('disabled', 'disabled')
|
||||
|
|
|
@ -8,23 +8,19 @@
|
|||
<div class="inner_editor_wrapper">
|
||||
<form class="media-metadata">
|
||||
<input ng-value="media.id" class="obj_id" type="hidden"/>
|
||||
<label class="publish-md-field">
|
||||
<?php echo _("Title") ?>
|
||||
<input disabled ng-model="media.track_title" type="text"/>
|
||||
</label>
|
||||
<label class="publish-md-field">
|
||||
<?php echo _("Creator") ?>
|
||||
<input disabled ng-model="media.artist_name" type="text"/>
|
||||
</label>
|
||||
<label class="publish-md-field">
|
||||
<?php echo _("Description") ?>
|
||||
<textarea disabled ng-model="media.description"></textarea>
|
||||
</label>
|
||||
<label class="publish-md-field"><?php echo _("Title") ?></label>
|
||||
<input disabled ng-model="media.track_title" type="text"/>
|
||||
|
||||
<label class="publish-md-field"><?php echo _("Creator") ?></label>
|
||||
<input disabled ng-model="media.artist_name" type="text"/>
|
||||
|
||||
<label class="publish-md-field"><?php echo _("Description") ?></label>
|
||||
<textarea disabled ng-model="media.description"></textarea>
|
||||
<fieldset>
|
||||
<legend><?php echo _("Publish to:"); ?></legend>
|
||||
<div ng-repeat="(source, label) in sources.toPublish">
|
||||
<div class="publish-sources" ng-repeat="(source, label) in sources.toPublish">
|
||||
<input ng-model="publishData[source]" type="checkbox" name="publish_sources" id="{{source}}">
|
||||
<label for="{{source}}">{{label}}</label><br/>
|
||||
<label class="source-name" for="{{source}}">{{label}}</label><br/>
|
||||
</div>
|
||||
<div ng-if="sources.toPublish.length == 0">
|
||||
<?php echo _("You have already published this track to all available sources!") . "<br/>"
|
||||
|
@ -36,7 +32,7 @@
|
|||
<div class="published-sources" ng-repeat="(source, label) in sources.published">
|
||||
<span class="sp-checked-icon checked-icon left-floated"></span>
|
||||
<span class="source-name">{{label}}</span>
|
||||
<button class="btn btn-small" ng-click="remove(source)"><?php echo _("Unpublish") ?></button>
|
||||
<button class="btn btn-small btn-danger" ng-click="remove(source)"><?php echo _("Unpublish") ?></button>
|
||||
</div>
|
||||
<div ng-if="sources.published.length == 0">
|
||||
<?php echo _("You haven't published this track to any sources!") . "<br/>"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue