CC-3819 : Add View on Soundcloud context menu option on calendar page

This commit is contained in:
Naomi Aro 2012-05-14 15:48:09 +02:00
parent f8900d4b05
commit 803c44611a
4 changed files with 36 additions and 13 deletions

View file

@ -80,7 +80,12 @@ class LibraryController extends Zend_Controller_Action
//create a sub menu for Soundcloud actions.
$menu["soundcloud"] = array("name" => "Soundcloud", "icon" => "soundcloud", "items" => array());
$scid = $file->getSoundCloudId();
$scid = $file->getSoundCloudId();
if ($scid > 0){
$url = $file->getSoundCloudLinkToFile();
$menu["soundcloud"]["items"]["view"] = array("name" => "View on Soundcloud", "icon" => "soundcloud", "url" => $url);
}
if (!is_null($scid)){
$text = "Re-upload to SoundCloud";
@ -90,11 +95,6 @@ class LibraryController extends Zend_Controller_Action
}
$menu["soundcloud"]["items"]["upload"] = array("name" => $text, "icon" => "soundcloud", "url" => "/library/upload-file-soundcloud/id/{$id}");
if ($scid > 0){
$url = $file->getSoundCloudLinkToFile();
$menu["soundcloud"]["items"]["view"] = array("name" => "View on Soundcloud", "icon" => "soundcloud", "url" => $url);
}
}
$this->view->items = $menu;