Showbuilder checkboxes and style fixes

This commit is contained in:
Duncan Sommerville 2015-08-06 16:01:44 -04:00
parent 83902ebbbe
commit cc36fcd37b
21 changed files with 445 additions and 313 deletions

View file

@ -217,6 +217,40 @@ class LibraryController extends Zend_Controller_Action
// is a cloud_file and handle it appropriately.
$url = $baseUrl."api/get-media/file/$id/download/true";
$menu["download"] = array("name" => _("Download"), "icon" => "download", "url" => $url);
// SOUNDCLOUD MENU OPTION
$ownerId = empty($obj) ? $file->getFileOwnerId() : $obj->getCreatorId();
if ($isAdminOrPM || $ownerId == $user->getId()) {
$soundcloudService = new SoundcloudService();
if ($type === "audioclip" && $soundcloudService->hasAccessToken()) {
//create a menu separator
$menu["sep1"] = "-----------";
//create a sub menu for Soundcloud actions.
$menu["soundcloud"] = array("name" => _(SOUNDCLOUD), "icon" => "soundcloud", "items" => array());
$serviceId = $soundcloudService->getServiceId($id);
if (!is_null($file) && $serviceId != 0) {
$menu["soundcloud"]["items"]["view"] = array("name" => _("View track"), "icon" => "soundcloud", "url" => $baseUrl . "soundcloud/view-on-sound-cloud/id/{$id}");
$menu["soundcloud"]["items"]["remove"] = array("name" => _("Remove track"), "icon" => "soundcloud", "url" => $baseUrl . "soundcloud/delete/id/{$id}");
} else {
// If a reference exists for this file ID, that means the user has uploaded the track
// but we haven't yet gotten a response from Celery, so disable the menu item
if ($soundcloudService->referenceExists($id)) {
$menu["soundcloud"]["items"]["upload"] = array(
"name" => _("Upload track"), "icon" => "soundcloud",
"url" => $baseUrl . "soundcloud/upload/id/{$id}", "disabled" => true
);
} else {
$menu["soundcloud"]["items"]["upload"] = array(
"name" => _("Upload track"), "icon" => "soundcloud",
"url" => $baseUrl . "soundcloud/upload/id/{$id}"
);
}
}
}
}
} elseif ($type === "playlist" || $type === "block") {
if ($type === 'playlist') {
$obj = new Application_Model_Playlist($id);
@ -263,40 +297,6 @@ class LibraryController extends Zend_Controller_Action
}
}
// SOUNDCLOUD MENU OPTION
$ownerId = empty($obj) ? $file->getFileOwnerId() : $obj->getCreatorId();
if ($isAdminOrPM || $ownerId == $user->getId()) {
$soundcloudService = new SoundcloudService();
if ($type === "audioclip" && $soundcloudService->hasAccessToken()) {
//create a menu separator
$menu["sep1"] = "-----------";
//create a sub menu for Soundcloud actions.
$menu["soundcloud"] = array("name" => _(SOUNDCLOUD), "icon" => "soundcloud", "items" => array());
$serviceId = $soundcloudService->getServiceId($id);
if (!is_null($file) && $serviceId != 0) {
$menu["soundcloud"]["items"]["view"] = array("name" => _("View track"), "icon" => "soundcloud", "url" => $baseUrl . "soundcloud/view-on-sound-cloud/id/{$id}");
$menu["soundcloud"]["items"]["remove"] = array("name" => _("Remove track"), "icon" => "soundcloud", "url" => $baseUrl . "soundcloud/delete/id/{$id}");
} else {
// If a reference exists for this file ID, that means the user has uploaded the track
// but we haven't yet gotten a response from Celery, so disable the menu item
if ($soundcloudService->referenceExists($id)) {
$menu["soundcloud"]["items"]["upload"] = array(
"name" => _("Upload track"), "icon" => "soundcloud",
"url" => $baseUrl . "soundcloud/upload/id/{$id}", "disabled" => true
);
} else {
$menu["soundcloud"]["items"]["upload"] = array(
"name" => _("Upload track"), "icon" => "soundcloud",
"url" => $baseUrl . "soundcloud/upload/id/{$id}"
);
}
}
}
}
if (empty($menu)) {
$menu["noaction"] = array("name"=>_("No action available"));
}

View file

@ -85,7 +85,7 @@ class Application_Form_ShowBuilderNew extends Zend_Form_SubForm
private function getShowNames()
{
$showNames = array("0" => "Filter by Show");
$showNames = array("0" => _("Filter by Show"));
$shows = CcShowQuery::create()
->setFormatter(ModelCriteria::FORMAT_ON_DEMAND)

View file

@ -9,7 +9,7 @@ if ($this->showPlaylist) {
$display = "display:none";
}
?>
<div id="side_playlist" class="pl-content ui-widget ui-widget-content block-shadow omega-block padded" style="height:697px; width:720px;<?php echo $display?>">
<div class="side_playlist pl-content ui-widget ui-widget-content block-shadow omega-block padded" style="height:697px; width:720px;<?php echo $display?>">
<?php if ($this->type == 'block') {
echo $this->render('playlist/smart-block.phtml');
} else if ($this->type == 'playlist') {

View file

@ -28,9 +28,9 @@ if (isset($this->obj)) {
</div>
<?php if (isset($this->obj)) : ?>
<input id="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"></input>
<input id="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
<input id='obj_type' type='hidden' value='playlist'></input>
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"></input>
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
<input class='obj_type' type='hidden' value='playlist'></input>
<div class="playlist_title">
<h3 id="obj_name">
<a id="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
@ -65,7 +65,7 @@ if (isset($this->obj)) {
<div class="clear"></div>
<div class="" style="clear:both; float:none; width:100%;">
<ul id="spl_sortable">
<ul class="spl_sortable">
<?php $this->contents = $contents;
echo $this->render('playlist/update.phtml') ?>
</ul>

View file

@ -25,9 +25,9 @@ if (isset($this->obj)) {
</div>
<?php if (isset($this->obj)) : ?>
<input id="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"></input>
<input id="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
<input id='obj_type' type='hidden' value='block'></input>
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"></input>
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
<input class='obj_type' type='hidden' value='block'></input>
<div class="playlist_title">
<h3 id="obj_name">
<a id="playlist_name_display" contenteditable="true">
@ -70,7 +70,7 @@ if (isset($this->obj)) {
<div class="clear"></div>
<div class="" style="clear:both; float:none; width:100%;">
<ul id="spl_sortable">
<ul class="spl_sortable">
<?php $this->contents = $contents;
echo $this->render('playlist/update.phtml') ?>
</ul>

View file

@ -38,9 +38,9 @@ if (isset($this->obj)) {
</div>
<?php if (isset($this->obj)) : ?>
<input id="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"></input>
<input id="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
<input id='obj_type' type='hidden' value='playlist'></input>
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"></input>
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
<input class='obj_type' type='hidden' value='playlist'></input>
<div class="playlist_title">
<h3 id="obj_name">
<a id="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
@ -75,7 +75,7 @@ if (isset($this->obj)) {
<div class="clear"></div>
<div class="" style="clear:both; float:none; width:100%;">
<ul id="spl_sortable">
<ul class="spl_sortable">
<?php $this->contents = $contents;
echo $this->render('playlist/update.phtml') ?>
</ul>

View file

@ -35,9 +35,9 @@ if (isset($this->obj)) {
</div>
<?php if (isset($this->obj)) : ?>
<input id="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"></input>
<input id="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
<input id='obj_type' type='hidden' value='block'></input>
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"></input>
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
<input class='obj_type' type='hidden' value='block'></input>
<div class="playlist_title">
<h3 id="obj_name">
<a id="playlist_name_display" contenteditable="true">
@ -80,7 +80,7 @@ if (isset($this->obj)) {
<div class="clear"></div>
<div class="" style="clear:both; float:none; width:100%;">
<ul id="spl_sortable">
<ul class="spl_sortable">
<?php $this->contents = $contents;
echo $this->render('playlist/update.phtml') ?>
</ul>

View file

@ -12,9 +12,9 @@
</div>
<?php if (isset($this->obj)) : ?>
<input id="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"/>
<input id="obj_lastMod" type="hidden" value="<?php echo "1";//$this->obj->getLastModified('U'); ?>"/>
<input id="obj_type" type="hidden" value="webstream"/>
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"/>
<input class="obj_lastMod" type="hidden" value="<?php echo "1";//$this->obj->getLastModified('U'); ?>"/>
<input class="obj_type" type="hidden" value="webstream"/>
<div class="status" style="display:none;"></div>
<div class="playlist_title">

View file

@ -22,9 +22,9 @@
</div>
<?php if (isset($this->obj)) : ?>
<input id="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"/>
<input id="obj_lastMod" type="hidden" value="<?php echo "1";//$this->obj->getLastModified('U'); ?>"/>
<input id="obj_type" type="hidden" value="webstream"/>
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"/>
<input class="obj_lastMod" type="hidden" value="<?php echo "1";//$this->obj->getLastModified('U'); ?>"/>
<input class="obj_type" type="hidden" value="webstream"/>
<div class="status" style="display:none;"></div>
<div class="playlist_title">