Rename airtime_mvc/ to legacy/

This commit is contained in:
jo 2021-10-11 13:43:25 +02:00
parent f0879322c2
commit 3e18d42c8b
1316 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,5 @@
<?php if ($this->objType == "block") { $displayText = "smart block"; } else { $displayText = $this->escape($this->objType); } ?>
<h3>You do not have permission to edit this <?php echo $displayText; ?>.</h3>
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"/>
<input class='obj_type' type='hidden' value="<?php echo $this->escape($this->objType); ?>"/>
<input type="hidden" class="playlist_name_display" contenteditable="true" value="<?php echo $this->escape($this->obj->getName()); ?>">

View file

@ -0,0 +1,87 @@
<?php
if (isset($this->obj)) {
$contents = $this->obj->getContents();
$count = count($contents);
}
?>
<?php if (isset($this->obj)) : ?>
<div class="inner_editor_title">
<H2><?php echo(_("Editing "));?>"<span class="title_obj_name"><?php if (isset($this->unsavedName)) echo $this->unsavedName;
else echo $this->escape($this->obj->getName());?></span>"</H2>
</div>
<div class="inner_editor_wrapper">
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"/>
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"/>
<input class='obj_type' type='hidden' value='playlist'/>
<dl class="zend_form playlist_editor">
<dt>
<label><?php echo(_("Name:")); ?></label>
</dt>
<dd>
<input type="text" class="playlist_name_display" contenteditable="true" value="<?php echo $this->escape($this->obj->getName()); ?>">
</dd>
<dt id="description-label"><label for="description"><?php echo _("Description:") ?></label></dt>
<dd id="description-element">
<textarea cols="24" rows="3" id="description" name="description"><?php echo $this->escape($this->obj->getDescription()); ?></textarea>
</dd>
</dl>
<?php //echo $this->form; ?>
</div>
<div class="ui-widget-header fg-toolbar btn-toolbar clearfix">
<h4 class="obj_length"><?php echo($this->length); ?></h4>
<h4 class="obj_length_label"><?php echo(_("Duration:"));?></h4>
<div class='btn-group'>
<button class="btn toggle-editor-form" title='<?php echo _("Toggle Details") ?>' type="button"><span class="icon-white spl-no-r-margin icon-chevron-up"></span></button>
</div>
<div class='btn-group'>
<button class="btn" title='<?php echo _("Shuffle playlist") ?>' type="button" id="playlist_shuffle_button"><?php echo _("Shuffle") ?></button>
</div>
<div class='btn-group'>
<button id="spl_crossfade" class="btn crossfade-main-button">
<i class='crossfade-main-icon'></i><span class="ui-button-text"><?php echo _("Playlist crossfade") ?></span>
</button>
</div>
<div class='btn-group'>
<button class="btn btn-danger" title='<?php echo _("Empty playlist content") ?>' type="button" id="pl-bl-clear-content"><?php echo _("Clear") ?></button>
</div>
<div class="clearfix"></div>
</div>
<div id="crossfade_main" class="crossfade-main clearfix" style="display:none;">
<span class="ui-icon ui-icon-closethick sp-closethick-center"></span>
<dl id="spl_editor-main" class="inline-list">
<dt><?php echo _("Fade in: "); ?></dt>
<dd><input class="spl_main_fade_in playlist_main_fade_input" value="0" /><span class='spl_cue_hint'> seconds</span></dd>
<dd class="edit-error"></dd>
<dt><?php echo _("Fade out: "); ?></dt>
<dd><input class="spl_main_fade_out playlist_main_fade_input" value="0" /><span class='spl_cue_hint'> seconds</span></dd>
<dd class="edit-error"></dd>
</dl>
</div>
<ul class="spl_sortable">
<?php $this->contents = $contents;
echo $this->render('playlist/update.phtml') ?>
</ul>
<div class="btn-toolbar clearfix">
<div class="btn-group pull-right">
<button class="btn" type="button" id="cancel_button" name="submit"><?php echo _("Cancel") ?></button>
</div>
<div class='btn-group pull-right'>
<button class="btn" title='<?php echo _("Save playlist") ?>' type="button" id="save_button"><?php echo _("Save") ?></button>
</div>
<div id='sp-success' class='success' style='display:none'></span></div>
</div>
<?php else : ?>
<div><?php echo _("No open playlist") ?></div>
<?php endif; ?>

View file

@ -0,0 +1,21 @@
<dl id="spl_cue_editor" class="inline-list">
<dd data-uri="<?php echo $this->uri; ?>">
<input type="button" class="pl-waveform-cues-btn" value="<?php echo _("Show Waveform")?>"></input>
</dd>
<dt><?php echo _("Cue In: "); ?><span class='spl_cue_hint'><?php echo _("(hh:mm:ss.t)")?></span></dt>
<dd id="spl_cue_in_<?php echo $this->id; ?>" class="spl_cue_in"
data-cue-in="<?php echo $this->cueIn; ?>"
data-cue-sec="<?php echo $this->cueInSec; ?>">
<span contenteditable="true" class="spl_text_input"><?php echo $this->cueIn; ?></span>
</dd>
<dd class="edit-error"></dd>
<dt><?php echo _("Cue Out: "); ?><span class='spl_cue_hint'><?php echo _("(hh:mm:ss.t)")?></span></dt>
<dd id="spl_cue_out_<?php echo $this->id; ?>" class="spl_cue_out"
data-cue-out="<?php echo $this->cueOut; ?>"
data-cue-sec="<?php echo $this->cueOutSec; ?>">
<span contenteditable="true" class="spl_text_input"><?php echo $this->cueOut; ?></span>
</dd>
<dd class="edit-error"></dd>
<dt><?php echo _("Original Length:"); ?></dt>
<dd id="spl_original"><span><?php echo $this->origLength; ?></span></dd>
</dl>

View file

@ -0,0 +1,31 @@
<dl id="spl_editor" class="inline-list">
<dd>
<input type="button" class="pl-waveform-fades-btn" value="<?php echo _("Show Waveform")?>"></input>
</dd>
<?php if ($this->item1Type == 0) {?>
<dt><?php echo _("Fade out: "); ?><span class='spl_cue_hint'><?php echo _("(ss.t)")?></span></dt>
<dd id="spl_fade_out_<?php echo $this->item1; ?>" class="spl_fade_out"
data-fadeout="<?php echo $this->item1Url; ?>"
data-cuein="<?php echo $this->cueIn1; ?>"
data-cueout="<?php echo $this->cueOut1; ?>"
data-length="<?php echo $this->fadeOut; ?>"
data-type="logarithmic"
data-item="<?php echo $this->item1; ?>">
<span contenteditable="true" class="spl_text_input"><?php echo $this->fadeOut; ?></span>
</dd>
<dd class="edit-error"></dd>
<?php }
if (isset($this->item2Url)) {?>
<dt><?php echo _("Fade in: "); ?><span class='spl_cue_hint'><?php echo _("(ss.t)")?></span></dt>
<dd id="spl_fade_in_<?php echo $this->item2; ?>" class="spl_fade_in"
data-fadein="<?php echo $this->item2Url; ?>"
data-offset="<?php if ($this->item1Type == 0) { echo $this->offset; } else { echo 0; } ?>"
data-cuein="<?php echo $this->cueIn2; ?>"
data-cueout="<?php echo $this->cueOut2; ?>" data-length="<?php echo $this->fadeIn; ?>"
data-type="logarithmic"
data-item="<?php echo $this->item2; ?>">
<span contenteditable="true" class="spl_text_input"><?php echo $this->fadeIn; ?></span>
</dd>
<dd class="edit-error"></dd>
<?php }?>
</dl>

View file

@ -0,0 +1,99 @@
<?php
if (isset($this->obj)) {
$contents = $this->obj->getContents();
$count = count($contents);
}
?>
<?php if (isset($this->obj)) : ?>
<div class="inner_editor_title">
<H2><?php echo(_("Editing "));?>"<span class="title_obj_name"><?php if (isset($this->unsavedName)) echo $this->unsavedName;
else echo $this->escape($this->obj->getName());?></span>"</H2>
</div>
<div class="inner_editor_wrapper smart-block-form">
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"/>
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"/>
<input class='obj_type' type='hidden' value='block'/>
<dl class="zend_form playlist_editor">
<dt>
<label><?php echo(_("Name:")); ?></label>
</dt>
<dd>
<input type="text" class="playlist_name_display" contenteditable="true" value="<?php
if (isset($this->unsavedName)) echo $this->unsavedName;
else echo $this->escape($this->obj->getName());
?>">
</dd>
</dl>
<?php echo $this->form; ?>
<div class="smart-block-advanced">
<dl>
<dt id="description-label"><label for="description"><?php echo _("Description:") ?></label></dt>
<dd id="description-element">
<textarea cols="24" rows="3" id="description" name="description"><?php
if (isset($this->unsavedDesc)) echo $this->unsavedDesc;
else echo $this->obj->getDescription();
?></textarea>
</dd>
</dl>
</div>
</div>
<div class="ui-widget-header fg-toolbar btn-toolbar clearfix">
<h4 class="obj_length"><?php echo($this->length); ?></h4>
<h4 class="obj_length_label"><?php echo(_("Duration:"));?></h4>
<div class='btn-group'>
<button class="btn toggle-editor-form" title='<?php echo _("Toggle Details") ?>' type="button"><span class="icon-white spl-no-r-margin icon-chevron-up"></span></button>
</div>
<div class='btn-group'>
<?php echo $this->form->getElement('generate_button');?>
</div>
<div class='btn-group'>
<?php echo $this->form->getElement('shuffle_button');?>
</div>
<div class='btn-group'>
<button id="spl_crossfade" class="btn crossfade-main-button">
<i class='crossfade-main-icon'></i><span class="ui-button-text"><?php echo _("Playlist crossfade") ?></span>
</button>
</div>
<div class='btn-group'>
<button class="btn btn-danger" title='<?php echo _("Remove all content from this smart block") ?>' type="button" id="pl-bl-clear-content"><?php echo _("Clear") ?></button>
</div>
<div class="clearfix"></div>
</div>
<div id="crossfade_main" class="crossfade-main clearfix" style="display:none;">
<span class="ui-icon ui-icon-closethick"></span>
<dl id="spl_editor-main" class="inline-list">
<dt><?php echo _("Fade in: "); ?></dt>
<dd>
<input class="spl_main_fade_in playlist_main_fade_input" value="0" /><span class='spl_cue_hint'> seconds</span></dd>
<dd class="edit-error"></dd>
<dt><?php echo _("Fade out: "); ?></dt>
<dd><input class="spl_main_fade_out playlist_main_fade_input" value="0" /><span class='spl_cue_hint'> seconds</span></dd></dd>
<dd class="edit-error"></dd>
</dl>
</div>
<ul class="spl_sortable">
<?php $this->contents = $contents;
echo $this->render('playlist/update.phtml') ?>
</ul>
<div class="btn-toolbar clearfix">
<div class="btn-group pull-right">
<button class="btn" type="button" id="cancel_button" name="submit"><?php echo _("Cancel") ?></button>
</div>
<div class='btn-group pull-right'>
<button class="btn" title='Save smart block&#39s title, description, and criteria' type="button" id="save_button"><?php echo _("Save") ?></button>
</div>
<div id='sp-success-saved' class='success' style='display:none'><span</div>
</div>
<?php else : ?>
<div><?php echo _("No smart block currently open") ?></div>
<?php endif; ?>

View file

@ -0,0 +1,168 @@
<?php
$items = $this->contents;
$isSmartBlock = ($this->obj instanceof Application_Model_Block);
$isPlaylist = ($this->obj instanceof Application_Model_Playlist);
if ($isSmartBlock && $this->showPoolCount) { ?>
<div class='sp_text_font sp_text_font_bold'>
<span id='sp_pool_count' class='sp_text_font sp_text_font_bold'>
<?php
echo $this->poolCount;
echo ngettext(" track matches your search criteria.", " tracks match your search criteria.", $this->poolCount);
?>
</span>
<?php if ($this->poolCount > 0) { ?>
<span class='checked-icon sp-checked-icon' id='sp_pool_count_icon'></span>
<?php }
else { ?>
<span class='sp-warning-icon' id='sp_pool_count_icon'></span>
<?php } ?>
</div>
<?php
}
if (count($items) && ($isSmartBlock || $isPlaylist)) : ?>
<?php $i = 0; ?>
<?php if ($isSmartBlock && !($this->obj->isStatic())) {
echo _("</br>This is only a preview of possible content generated by the smart block based upon the above criteria.");}
?>
<?php foreach($items as $item) :
$staticBlock = null;
$nextFileUrl = null;
if ($item['type'] == 2) {
$bl= new Application_Model_Block($item['item_id']);
$staticBlock = $bl->isStatic();
$fileUrl = null;
}
else if ($item['type'] == 1) {
$fileUrl = null;
}
else if ($item['type'] == 0) {
$audiofile = Application_Model_StoredFile::RecallById($item['item_id']);
$fileUrl = $audiofile->getFileUrl();
}
if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) {
$nextAudiofile = Application_Model_StoredFile::RecallById($items[$i+1]['item_id']);
$nextFileUrl = $nextAudiofile->getFileUrl();
}
?>
<li class="ui-state-default" id="spl_<?php echo $item["id"] ?>" unqid="<?php echo $item["id"]; ?>">
<div class="list-item-container">
<?php if ($item['type'] == 0 && $item['exists']):?>
<div class="big_play" audioFile="<?php echo $item["id"]; ?>" data-mime-type="<?php echo $item["mime"]; ?>">
<span class="ui-icon ui-icon-play"></span>
</div>
<?php elseif ($item['type'] == 1 && $item['exists']): ?>
<div class="big_play" data-mime-type="<?php echo $item["mime"]; ?>">
<span class="ui-icon ui-icon-play"></span>
</div>
<?php elseif ($item['type'] == 2 && $item['exists']): ?>
<div class="big_play" blockId="<?php echo $item["item_id"]; ?>" blocktype="<?php echo $staticBlock?"static":"dynamic"?>">
<span class="ui-icon ui-icon-play"></span>
</div>
<?php else:?>
<div class="big_play ui-state-hover">
<span class="ui-icon ui-icon-alert"></span>
</div>
<?php endif; ?>
<div class="text-row top">
<span class="spl_playlength"><?php echo $item["length"] ?></span>
<?php if ($item['type'] == 0) {?>
<!-- <span class="spl_cue ui-state-default"></span> -->
<?php } else if ($item['type'] == 2) {
if ($staticBlock) {?>
<span class="spl_block_expand close" blockId="<?php echo $item["item_id"]; ?>" id="expand_block_<?php echo $item["id"]?>">
<span class="ui-icon ui-icon-triangle-2-n-s"></span>
<?php echo _("Expand Static Block")?>
</span>
<?php } else { ?>
<span class="spl_block_expand close" blockId="<?php echo $item["item_id"]; ?>" id="expand_block_<?php echo $item["id"]?>">
<span class="ui-icon ui-icon-triangle-2-n-s"></span>
<?php echo _("Expand Dynamic Block")?>
</span>
<?php }
} ?>
<span class="spl_title"><?php echo $item['track_title'] ?></span>
</div>
<div class="text-row">
<span class="spl_artist"><?php echo $item['creator'] ?></span>
<span class="spl_offset"><?php echo $item["offset"]?></span>
</div>
<?php //create the crossfade icon.
if (($i < count($items) -1) && !($items[$i]['type'] == 2 && $items[$i+1]['type'])):
?>
<!-- <div id="fade_<?php echo $i ?>" class="spl_fade_control ui-state-default"></div> -->
<?php endif; ?>
<span id="remove_<?php echo $item["id"] ?>" class="ui-icon ui-icon-closethick"></span>
</div>
<?php if ($item['type'] == 0) {?>
<div id="cues_<?php echo $i ?>" class="cue-edit clearfix" style="display: none">
<?php echo $this->partial('playlist/set-cue.phtml', array(
'id' => $item["id"],
'cueIn' => $item['cuein'],
'cueOut' => $item['cueout'],
'cueInSec' => $item['cueInSec'],
'cueOutSec' => $item['cueOutSec'],
'uri' => $fileUrl,
'origLength' => $item['orig_length'])); ?>
</div>
<?php }?>
<?php //create a fade editor box
//(fadeout of current position + fade in of next position)
if(($i < count($items) -1) && !($items[$i]['type'] == 2 && $items[$i+1]['type'])):
?>
<div id="crossfade_<?php echo $i ?>-<?php echo $i+1 ?>" class="crossfade clearfix" style="display: none">
<?php
$vars = array(
'item1' => $items[$i]['id'],
'fadeOut' => $items[$i]['fadeout'],
'fadeIn' => $items[$i+1]['fadein'],
'item1Type' => $items[$i]['type'],
'cueIn1' => $items[$i]['cueInSec'],
'cueOut1' => $items[$i]['cueOutSec'],
'item1Url' => $fileUrl
);
$item2 = array(
'item2Url' => $nextFileUrl,
'item2' => $items[$i+1]['id'],
'item2Type' => $items[$i+1]['type'],
'offset' => $items[$i]['trackSec'] - $items[$i+1]['trackoffset'],
'cueIn2' => $items[$i+1]['cueInSec'],
'cueOut2' => $items[$i+1]['cueOutSec']
);
if (isset($nextFileUrl)) {
$vars = $vars + $item2;
}
echo $this->partial('playlist/set-fade.phtml', $vars);
?>
</div>
<?php endif; ?>
<?php if ($item['type'] == 2) {?>
<ul style='display:none' id="block_<?php echo $item["id"]?>_info" class="smart-block-info expand-block-separate"></ul>
<?php } ?>
</li>
<?php $i = $i+1; ?>
<?php endforeach; ?>
<?php else : ?>
<div class="spl_empty">
<?php
if ($this->obj instanceof Application_Model_Block) {
if ($this->obj->isStatic()) {
echo _("Choose some search criteria above and click Generate to create this playlist.");
} else {
echo _("A track list will be generated when you schedule this smart block into a show.");
}
} else {
echo _("Drag tracks here from your library to add them to the playlist");
}
?>
</div>
<?php endif; ?>