2012-08-08 21:29:09 +02:00
<?php
2012-08-09 16:47:43 +02:00
if (isset($this->obj)) {
$contents = $this->obj->getContents();
$count = count($contents);
}
2012-08-08 21:29:09 +02:00
?>
2012-07-25 17:00:46 +02:00
<?php if ( isset ( $this -> obj )) : ?>
2015-08-28 01:00:23 +02:00
< div class = "inner_editor_title" >
2022-08-10 13:38:19 +02:00
< 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 >
2015-08-28 01:00:23 +02:00
< / div >
2018-12-13 16:11:42 +01:00
< div class = "inner_editor_wrapper smart-block-form" >
2022-08-10 13:38:19 +02:00
< 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' / >
2015-08-26 19:10:51 +02:00
< dl class = "zend_form playlist_editor" >
< dt >
2022-08-10 13:38:19 +02:00
< label > <?php echo ( _ ( "Name:" )); ?> </ label >
2015-08-26 19:10:51 +02:00
< / dt >
< dd >
< input type = "text" class = "playlist_name_display" contenteditable = "true" value = " <?php
2022-08-10 13:38:19 +02:00
if (isset($this->unsavedName)) echo $this->unsavedName;
else echo $this->escape($this->obj->getName());
?>">
2015-08-26 19:10:51 +02:00
< / dd >
2012-07-25 17:00:46 +02:00
< / dl >
2015-08-18 21:23:42 +02:00
<?php echo $this -> form ; ?>
2012-07-25 17:00:46 +02:00
2018-12-13 16:11:42 +01:00
< 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
2022-08-10 13:38:19 +02:00
if (isset($this->unsavedDesc)) echo $this->unsavedDesc;
else echo $this->obj->getDescription();
?>< / textarea >
2018-12-13 16:11:42 +01:00
< / dd >
< / dl >
< / div >
2015-08-26 19:10:51 +02:00
< / div >
< div class = "ui-widget-header fg-toolbar btn-toolbar clearfix" >
2022-08-10 13:38:19 +02:00
< h4 class = "obj_length" > <?php echo ( $this -> length ); ?> </ h4 >
< h4 class = "obj_length_label" > <?php echo ( _ ( "Duration:" )); ?> </ h4 >
2015-08-26 19:10:51 +02:00
2015-08-28 01:00:23 +02:00
< 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 >
2015-08-26 19:10:51 +02:00
< div class = 'btn-group' >
2022-08-10 13:38:19 +02:00
<?php echo $this -> form -> getElement ( 'generate_button' ); ?>
2015-08-18 21:23:42 +02:00
< / div >
2015-08-26 19:10:51 +02:00
< div class = 'btn-group' >
2022-08-10 13:38:19 +02:00
<?php echo $this -> form -> getElement ( 'shuffle_button' ); ?>
2015-08-26 19:10:51 +02:00
< / div >
< div class = 'btn-group' >
2015-09-08 22:56:55 +02:00
< button id = "spl_crossfade" class = "btn crossfade-main-button" >
2015-08-26 19:10:51 +02:00
< i class = 'crossfade-main-icon' ></ i >< span class = "ui-button-text" > <?php echo _ ( "Playlist crossfade" ) ?> </ span >
2015-09-08 22:39:33 +02:00
< / button >
2015-08-26 19:10:51 +02:00
< / 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 >
2015-08-18 21:23:42 +02:00
< / div >
2015-08-26 19:10:51 +02:00
< 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" >
2015-09-09 19:54:16 +02:00
< dt > <?php echo _ ( "Fade in: " ); ?> </ dt >
< dd >
2022-08-10 13:38:19 +02:00
< input class = "spl_main_fade_in playlist_main_fade_input" value = "0" / > < span class = 'spl_cue_hint' > seconds< / span >
< / dd >
2015-08-26 19:10:51 +02:00
< dd class = "edit-error" > < / dd >
2015-09-09 19:54:16 +02:00
< dt > <?php echo _ ( "Fade out: " ); ?> </ dt >
2022-08-10 13:38:19 +02:00
< dd > < input class = "spl_main_fade_out playlist_main_fade_input" value = "0" / > < span class = 'spl_cue_hint' > seconds< / span > < / dd >
< / dd >
2015-08-26 19:10:51 +02:00
< dd class = "edit-error" > < / dd >
< / dl >
< / div >
2015-08-18 21:23:42 +02:00
< ul class = "spl_sortable" >
<?php $this -> contents = $contents ;
2022-08-10 13:38:19 +02:00
echo $this->render('playlist/update.phtml') ?>
2015-08-18 21:23:42 +02:00
< / ul >
2015-08-26 19:10:51 +02:00
< div class = "btn-toolbar clearfix" >
2015-08-18 21:23:42 +02:00
< 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's title, description, and criteria' type = "button" id = "save_button" > <?php echo _ ( "Save" ) ?> </ button >
< / div >
2022-08-10 13:38:19 +02:00
< div id = 'sp-success-saved' class = 'success' style = 'display:none' >
< span < / div >
< / div >
2012-07-25 17:00:46 +02:00
2022-08-10 13:38:19 +02:00
<?php else : ?>
< div > <?php echo _ ( "No smart block currently open" ) ?> </ div >
<?php endif ; ?>