Major layout work on the smartblock and playlist editors
* CC-6088: Smart Block form needs to have a form layout * CC-6089: Editor view name fields must be made <input> fields
This commit is contained in:
parent
706caa8458
commit
98ac8fd851
10 changed files with 223 additions and 167 deletions
|
@ -1,10 +1,12 @@
|
|||
<form class="smart-block-form" method="post" action="">
|
||||
<dl class='zend_form search-criteria'>
|
||||
<div id='sp-success' class='success' style='display:none'></div>
|
||||
<dd id='sp_type-element'>
|
||||
<dt>
|
||||
<label class='sp-label'>
|
||||
<?php echo $this->element->getElement('sp_type')->getLabel() ?>
|
||||
<?php echo $this->element->getElement('sp_type')->getLabel() ?>
|
||||
</label>
|
||||
</dt>
|
||||
<dd id='sp_type-element'>
|
||||
<?php $i=0;
|
||||
$value = $this->element->getElement('sp_type')->getValue();
|
||||
foreach ($this->element->getElement('sp_type')->getMultiOptions() as $radio) : ?>
|
||||
|
@ -16,7 +18,52 @@
|
|||
<?php endforeach; ?>
|
||||
<span class='playlist_type_help_icon'></span>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
<label class='sp_text_font'><?php echo $this->element->getElement('sp_repeat_tracks')->getLabel() ?></label>
|
||||
</dt>
|
||||
<dd id='sp_repeat_tracks-element'>
|
||||
<?php echo $this->element->getElement('sp_repeat_tracks')?>
|
||||
<?php if($this->element->getElement("sp_repeat_tracks")->hasErrors()) : ?>
|
||||
<?php foreach($this->element->getElement("sp_repeat_tracks")->getMessages() as $error): ?>
|
||||
<span class='errors sp-errors'>
|
||||
<?php echo $error; ?>
|
||||
</span>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<span class='repeat_tracks_help_icon'></span>
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
<label class='sp_text_font'><?php echo $this->element->getElement('sp_sort_options')->getLabel();?></label>
|
||||
</dt>
|
||||
<dd id='sp_sort-element'>
|
||||
<?php echo $this->element->getElement('sp_sort_options') ?>
|
||||
<?php if($this->element->getElement("sp_sort_options")->hasErrors()) : ?>
|
||||
<?php foreach($this->element->getElement("sp_sort_options")->getMessages() as $error): ?>
|
||||
<span class='errors sp-errors'>
|
||||
<?php echo $error; ?>
|
||||
</span>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
<label class='sp_text_font'><?php echo $this->element->getElement('sp_limit_value')->getLabel() ?></label>
|
||||
</dt>
|
||||
<dd id='sp_limit-element'>
|
||||
<?php echo $this->element->getElement('sp_limit_value')?>
|
||||
<?php echo $this->element->getElement('sp_limit_options') ?>
|
||||
<?php if($this->element->getElement("sp_limit_value")->hasErrors()) : ?>
|
||||
<?php foreach($this->element->getElement("sp_limit_value")->getMessages() as $error): ?>
|
||||
<span class='errors sp-errors'>
|
||||
<?php echo $error; ?>
|
||||
</span>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
|
||||
<dt><label><?php echo(_("Search Criteria:"));?></label></dt>
|
||||
<dd id='sp_criteria-element' class='criteria-element'>
|
||||
<?php for ($i = 0; $i < $this->criteriasLength; $i++) {
|
||||
// modRowMap holds the number of modifier rows for each criteria element
|
||||
|
@ -44,19 +91,19 @@
|
|||
echo 'style=display:none';
|
||||
} ?>>
|
||||
<?php echo $this->element->getElement("sp_criteria_field_".$i."_".$j) ?>
|
||||
<a class='btn btn-small' id='modifier_add_<?php echo $i ?>'>
|
||||
<i class='icon-white icon-plus'></i>
|
||||
</a>
|
||||
<?php echo $this->element->getElement("sp_criteria_modifier_".$i."_".$j) ?>
|
||||
<?php echo $this->element->getElement("sp_criteria_value_".$i."_".$j) ?>
|
||||
<span class='sp_text_font' id="extra_criteria" <?php echo $this->element->getElement("sp_criteria_extra_".$i."_".$j)->getAttrib("disabled") == "disabled"?'style="display:none;"':""?>><?php echo _(" to "); ?><?php echo $this->element->getElement('sp_criteria_extra_'.$i."_".$j) ?></span>
|
||||
|
||||
<a style='margin-right:3px' class='btn btn-small btn-danger' id='criteria_remove_<?php echo $i ?>'>
|
||||
<i class='icon-white icon-remove'></i>
|
||||
</a>
|
||||
<span class='db-logic-label' <?php if ($nextDisabled) echo "style='display:none'"?>>
|
||||
<?php echo $logicLabel;?>
|
||||
</span>
|
||||
<a class='btn btn-small' id='modifier_add_<?php echo $i ?>'>
|
||||
<i class='icon-white icon-plus'></i>
|
||||
</a>
|
||||
|
||||
<?php if($this->element->getElement("sp_criteria_field_".$i."_".$j)->hasErrors()) : ?>
|
||||
<?php foreach($this->element->getElement("sp_criteria_field_".$i."_".$j)->getMessages() as $error): ?>
|
||||
<span class='errors sp-errors'>
|
||||
|
@ -69,42 +116,6 @@
|
|||
|
||||
<?php } ?>
|
||||
</dd>
|
||||
|
||||
<dd id='sp_repeat_tracks-element'>
|
||||
<span class='sp_text_font'><?php echo $this->element->getElement('sp_repeat_tracks')->getLabel() ?></span>
|
||||
<?php echo $this->element->getElement('sp_repeat_tracks')?>
|
||||
<?php if($this->element->getElement("sp_repeat_tracks")->hasErrors()) : ?>
|
||||
<?php foreach($this->element->getElement("sp_repeat_tracks")->getMessages() as $error): ?>
|
||||
<span class='errors sp-errors'>
|
||||
<?php echo $error; ?>
|
||||
</span>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<span class='repeat_tracks_help_icon'></span>
|
||||
</dd>
|
||||
<dd id='sp_sort-element'>
|
||||
<span class='sp_text_font'>Sort tracks by</span>
|
||||
<?php echo $this->element->getElement('sp_sort_options') ?>
|
||||
<?php if($this->element->getElement("sp_sort_options")->hasErrors()) : ?>
|
||||
<?php foreach($this->element->getElement("sp_sort_options")->getMessages() as $error): ?>
|
||||
<span class='errors sp-errors'>
|
||||
<?php echo $error; ?>
|
||||
</span>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<dd id='sp_limit-element'>
|
||||
<span class='sp_text_font'><?php echo $this->element->getElement('sp_limit_value')->getLabel() ?></span>
|
||||
<?php echo $this->element->getElement('sp_limit_value')?>
|
||||
<?php echo $this->element->getElement('sp_limit_options') ?>
|
||||
<?php if($this->element->getElement("sp_limit_value")->hasErrors()) : ?>
|
||||
<?php foreach($this->element->getElement("sp_limit_value")->getMessages() as $error): ?>
|
||||
<span class='errors sp-errors'>
|
||||
<?php echo $error; ?>
|
||||
</span>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
|
||||
<?php if ($this->showPoolCount) { ?>
|
||||
<div class='sp_text_font sp_text_font_bold'>
|
||||
|
@ -137,12 +148,3 @@
|
|||
</dl>
|
||||
|
||||
</form>
|
||||
|
||||
<div class='btn-toolbar left-floated'>
|
||||
<div class='btn-group sp-button'>
|
||||
<?php echo $this->element->getElement('generate_button');?>
|
||||
</div>
|
||||
<div class='btn-group sp-button'>
|
||||
<?php echo $this->element->getElement('shuffle_button');?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -10,54 +10,60 @@ if (isset($this->obj)) {
|
|||
<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'/>
|
||||
<div class="playlist_title">
|
||||
<h3 class="obj_name">
|
||||
<a class="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
|
||||
</h3>
|
||||
<h4 class="obj_length"><?php echo $this->length; ?></h4>
|
||||
</div>
|
||||
|
||||
<div id='sp-success' class='success' style='display:none'></div>
|
||||
|
||||
<dl class="zend_form">
|
||||
<dt id="description-label"><label for="description"><?php echo _("Description") ?></label></dt>
|
||||
<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="80" rows="24" id="description" name="description"><?php echo $this->escape($this->obj->getDescription()); ?></textarea>
|
||||
<textarea cols="24" rows="3" id="description" name="description"><?php echo $this->escape($this->obj->getDescription()); ?></textarea>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<div class="btn-toolbar spl-no-margin clearfix left-floated">
|
||||
<div class='btn-group pull-right'>
|
||||
<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='btn-group pull-right'>
|
||||
<button class="btn" title='<?php echo _("Shuffle playlist") ?>' type="button" id="playlist_shuffle_button"><?php echo _("Shuffle") ?></button>
|
||||
</div>
|
||||
<div class='btn-group pull-right'>
|
||||
<a href="#" id="spl_crossfade" class="btn crossfade-main-button" style="display:<?php echo $count > 0 ?"block;":"none;"?>">
|
||||
<i class='crossfade-main-icon'></i><span class="ui-button-text"><?php echo _("Playlist crossfade") ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php //echo $this->form; ?>
|
||||
|
||||
<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: "); ?><span class='spl_cue_hint'>(ss.t)</span></dt>
|
||||
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_in">00</span></dd>
|
||||
<dd class="edit-error"></dd>
|
||||
<dt><?php echo _("Fade out: "); ?><span class='spl_cue_hint'>(ss.t)</span></dt>
|
||||
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_out">00</span></dd>
|
||||
<dd class="edit-error"></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" title='<?php echo _("Shuffle playlist") ?>' type="button" id="playlist_shuffle_button"><?php echo _("Shuffle") ?></button>
|
||||
</div>
|
||||
<div class='btn-group'>
|
||||
<a href="#" id="spl_crossfade" class="btn crossfade-main-button" style="display:<?php echo $count > 0 ?"inherit;":"none;"?>">
|
||||
<i class='crossfade-main-icon'></i><span class="ui-button-text"><?php echo _("Playlist crossfade") ?></span>
|
||||
</a>
|
||||
</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: "); ?><span class='spl_cue_hint'>(ss.msec)</span></dt>
|
||||
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_in">00</span></dd>
|
||||
<dd class="edit-error"></dd>
|
||||
<dt><?php echo _("Fade out: "); ?><span class='spl_cue_hint'>(ss.msec)</span></dt>
|
||||
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_out">00</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 spl-no-margin clearfix">
|
||||
<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>
|
||||
|
|
|
@ -10,55 +10,70 @@ if (isset($this->obj)) {
|
|||
<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'/>
|
||||
<div class="playlist_title">
|
||||
<h3 class="obj_name">
|
||||
<a class="playlist_name_display" contenteditable="true">
|
||||
<?php
|
||||
if (isset($this->unsavedName)) echo $this->unsavedName;
|
||||
else echo $this->escape($this->obj->getName());
|
||||
?>
|
||||
</a>
|
||||
</h3>
|
||||
<h4 class="obj_length"><?php echo $this->length; ?></h4>
|
||||
</div>
|
||||
|
||||
<div id='sp-success-saved' class='success' style='display:none'></div>
|
||||
|
||||
<dl class="zend_form">
|
||||
<dt id="description-label"><label for="description"><?php echo _("Description") ?></label></dt>
|
||||
<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>
|
||||
<dt id="description-label"><label for="description"><?php echo _("Description:") ?></label></dt>
|
||||
<dd id="description-element">
|
||||
<textarea cols="80" rows="24" id="description" name="description"><?php if (isset($this->unsavedDesc)) echo $this->unsavedDesc; else echo $this->obj->getDescription();?></textarea>
|
||||
<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>
|
||||
|
||||
<?php echo $this->form; ?>
|
||||
<div class="btn-toolbar spl-no-margin clearfix left-floated">
|
||||
<div class='btn-group pull-right'>
|
||||
<button class="btn btn-danger" title='<?php echo _("Empty smart block content") ?>' type="button" id="pl-bl-clear-content"><?php echo _("Clear") ?></button>
|
||||
</div>
|
||||
<div class='btn-group pull-right'>
|
||||
<a href="#" id="spl_crossfade" class="btn crossfade-main-button" style="display:<?php echo ($this->obj->isStatic() && $count > 0) ?"block;":"none;"?>">
|
||||
<i class='crossfade-main-icon'></i><span class="ui-button-text"><?php echo _("Playlist crossfade") ?></span>
|
||||
</a>
|
||||
</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: "); ?><span class='spl_cue_hint'><?php echo _("(ss.t)")?></span></dt>
|
||||
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_in">00</span></dd>
|
||||
<dd class="edit-error"></dd>
|
||||
<dt><?php echo _("Fade out: "); ?><span class='spl_cue_hint'><?php echo _("(ss.t)")?></span></dt>
|
||||
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_out">00</span></dd>
|
||||
<dd class="edit-error"></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'>
|
||||
<?php echo $this->form->getElement('generate_button');?>
|
||||
</div>
|
||||
<div class='btn-group'>
|
||||
<?php echo $this->form->getElement('shuffle_button');?>
|
||||
</div>
|
||||
<div class='btn-group'>
|
||||
<a href="#" id="spl_crossfade" class="btn crossfade-main-button" style="display:<?php echo ($this->obj->isStatic() && $count > 0) ?"inherit;":"none;"?>">
|
||||
<i class='crossfade-main-icon'></i><span class="ui-button-text"><?php echo _("Playlist crossfade") ?></span>
|
||||
</a>
|
||||
</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: "); ?><span class='spl_cue_hint'><?php echo _("(ss.t)")?></span></dt>
|
||||
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_in">00</span></dd>
|
||||
<dd class="edit-error"></dd>
|
||||
<dt><?php echo _("Fade out: "); ?><span class='spl_cue_hint'><?php echo _("(ss.t)")?></span></dt>
|
||||
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_out">00</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 spl-no-margin clearfix">
|
||||
<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>
|
||||
|
@ -68,5 +83,5 @@ if (isset($this->obj)) {
|
|||
</div>
|
||||
|
||||
<?php else : ?>
|
||||
<div><?php echo _("No open smart block") ?></div>
|
||||
<div><?php echo _("No smart block currently open") ?></div>
|
||||
<?php endif; ?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue