File "afe6822030fa7e9f6c8042b13652d862fd9879a9_0.file.admin-blog-articles-edit-content.tmpl.php"
Full Path: /srv/www/www.cadoro.it/src/templates_c/afe6822030fa7e9f6c8042b13652d862fd9879a9_0.file.admin-blog-articles-edit-content.tmpl.php
File size: 22.61 KB
MIME-type: text/x-php
Charset: utf-8
<?php
/* Smarty version 3.1.29, created on 2024-05-06 17:56:26
from "/srv/www/www.cadoro.it/src/templates/admin-blog-articles-edit-content.tmpl" */
if ($_smarty_tpl->smarty->ext->_validateCompiled->decodeProperties($_smarty_tpl, array (
'has_nocache_code' => false,
'version' => '3.1.29',
'unifunc' => 'content_6638fdaacc70e4_41976998',
'file_dependency' =>
array (
'afe6822030fa7e9f6c8042b13652d862fd9879a9' =>
array (
0 => '/srv/www/www.cadoro.it/src/templates/admin-blog-articles-edit-content.tmpl',
1 => 1708527642,
2 => 'file',
),
),
'includes' =>
array (
'file:layout-admin.tmpl' => 1,
),
),false)) {
function content_6638fdaacc70e4_41976998 ($_smarty_tpl) {
if (!is_callable('smarty_function_html_options')) require_once '/srv/www/www.cadoro.it/src/vendor/smarty/smarty/libs/plugins/function.html_options.php';
$_smarty_tpl->ext->_inheritance->init($_smarty_tpl, true);
?>
<html>
<body>
<?php
$_smarty_tpl->ext->_inheritance->processBlock($_smarty_tpl, 0, "breadcrumbs", array (
0 => 'block_5990249226638fdaac065e6_79383461',
1 => false,
3 => 0,
2 => 0,
));
?>
<?php
$_smarty_tpl->ext->_inheritance->processBlock($_smarty_tpl, 0, "content", array (
0 => 'block_252228836638fdaac0ab00_86467290',
1 => false,
3 => 0,
2 => 0,
));
?>
</body>
</html>
<?php $_smarty_tpl->ext->_inheritance->endChild($_smarty_tpl);
$_smarty_tpl->smarty->ext->_subtemplate->render($_smarty_tpl, "file:layout-admin.tmpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 2, false);
}
/* {block 'breadcrumbs'} file:admin-blog-articles-edit-content.tmpl */
function block_5990249226638fdaac065e6_79383461($_smarty_tpl, $_blockParentStack) {
?>
<div class="breadcrumbs">
<a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/blog-articles">Blog: Articoli</a> <span class="divider">»</span>
<a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/blog-articles/<?php echo $_smarty_tpl->tpl_vars['article']->value['id'];?>
"><?php echo $_smarty_tpl->tpl_vars['article']->value['slug'];?>
</a> <span class="divider">»</span>
<strong>Contenuto</strong>
</div>
<?php
}
/* {/block 'breadcrumbs'} */
/* {block 'content'} file:admin-blog-articles-edit-content.tmpl */
function block_252228836638fdaac0ab00_86467290($_smarty_tpl, $_blockParentStack) {
?>
<div class="sheet">
<div class="sheet-header">
<h1>
<?php if (_request('delete') == 1) {?>Elimina<?php } else { ?>Modifica<?php }?> il blocco di contenuto dell'articolo
<small><?php echo $_smarty_tpl->tpl_vars['article']->value['slug'];?>
</small>
</h1>
</div>
<div class="sheet-body">
<?php if ($_smarty_tpl->tpl_vars['errors']->value) {?>
<div class="alert alert-danger">
<strong>ATTENZIONE: si sono verificati degli errori, correggere prima di proseguire!</strong>
</div>
<?php }?>
<form class="form-horizontal" method="post" action="" enctype="multipart/form-data">
<fieldset>
<legend>
<?php if (_request('delete')) {?>
Sei sicuro di voler procedere con l'eliminazione del blocco di contenuti?
<?php } else { ?>
Informazioni di base
<?php }?>
</legend>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['slug'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="slug">SLUG</label>
<div class="controls col-md-9">
<input type="text" class="form-control" id="slug" name="slug" value="<?php echo _f('slug',$_smarty_tpl->tpl_vars['content']->value);?>
"<?php if (_request('delete')) {?> readonly<?php }?>>
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['slug'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
<p class="help-block">
SLUG per link interni tra i blocchi, nel formato <code>#slug</code>.
</p>
</div>
</div>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['name'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="name">Nome</label>
<div class="controls col-md-9">
<input type="text" class="form-control" id="name" name="name" value="<?php echo _f('name',$_smarty_tpl->tpl_vars['content']->value);?>
"<?php if (_request('delete')) {?> readonly<?php }?>>
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['name'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
<p class="help-block">
Campo descrittivo, non mostrato all'interno del sito pubblico.
</p>
</div>
</div>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['sorting'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="sorting">Posizione</label>
<div class="controls col-md-9">
<input type="text" class="form-control" id="sorting" name="sorting" value="<?php echo _f('sorting',$_smarty_tpl->tpl_vars['content']->value);?>
"<?php if (_request('delete')) {?> readonly<?php }?>>
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['sorting'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
<p class="help-block">
Inserire un valore numerico (es. 1) per l'ordinamento del blocco all'interno dell'articolo.<br>
I numeri più bassi vengono visualizzati prima dei numeri più alti.
</p>
</div>
</div>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['type'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="type">Tipo</label>
<div class="controls col-md-9">
<select name="type" class="form-control"<?php if (_request('delete')) {?> readonly<?php }?>>
<option value=""></option>
<?php echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['PAGE_CONTENT_TYPES']->value,'selected'=>_f('type',$_smarty_tpl->tpl_vars['content']->value)),$_smarty_tpl);?>
</select>
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['type'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
</div>
</div>
</fieldset>
<?php if (!_request('delete')) {?>
<fieldset class="mt30">
<legend>Dettaglio contenuto</legend>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['title'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="title">Titolo</label>
<div class="controls col-md-9">
<input type="text" class="form-control" id="title" name="title" value="<?php echo _f('title',$_smarty_tpl->tpl_vars['content']->value);?>
">
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['title'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
</div>
</div>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['subtitle'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="subtitle">Sottotitolo</label>
<div class="controls col-md-9">
<input type="text" class="form-control" id="subtitle" name="subtitle" value="<?php echo _f('subtitle',$_smarty_tpl->tpl_vars['content']->value);?>
">
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['subtitle'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
</div>
</div>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['image'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="image">Immagine</label>
<div class="controls col-md-9">
<input type="file" class="form-control" id="image" name="image" value="">
<?php if (isset($_smarty_tpl->tpl_vars['content']->value['image']) && $_smarty_tpl->tpl_vars['content']->value['image']) {?>
<p class="mt20">
<input type="hidden" name="image" value="<?php echo $_smarty_tpl->tpl_vars['content']->value['image'];?>
">
<img src="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/assets/<?php echo $_smarty_tpl->tpl_vars['content']->value['image'];?>
" alt="" class="img-responsive img-editable" id="img_image">
</p>
<?php }?>
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['image'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
</div>
</div>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['image_link'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="image_link">Immagine: Link di destinazione</label>
<div class="controls col-md-9">
<input type="text" class="form-control" id="image_link" name="image_link" value="<?php echo _f('image_link',$_smarty_tpl->tpl_vars['content']->value);?>
">
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['image_link'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
</div>
</div>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['cta'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="cta">Call to action: Testo del pulsante</label>
<div class="controls col-md-9">
<input type="text" class="form-control" id="cta" name="cta" value="<?php echo _f('cta',$_smarty_tpl->tpl_vars['content']->value);?>
">
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['cta'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
</div>
</div>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['cta_link'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="cta_link">Call to action: Link di destinazione</label>
<div class="controls col-md-9">
<input type="text" class="form-control" id="cta_link" name="cta_link" value="<?php echo _f('cta_link',$_smarty_tpl->tpl_vars['content']->value);?>
">
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['cta_link'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
</div>
</div>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['text_1'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="text_1">Testo 1</label>
<div class="controls col-md-9">
<textarea class="form-control textarea-large" id="text_1" name="text_1" data-behaviour="ckeditor"><?php echo _f('text_1',$_smarty_tpl->tpl_vars['content']->value);?>
</textarea>
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['text_1'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
</div>
</div>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['text_2'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="text_2">Testo 2</label>
<div class="controls col-md-9">
<textarea class="form-control textarea-large" id="text_2" name="text_2" data-behaviour="ckeditor"><?php echo _f('text_2',$_smarty_tpl->tpl_vars['content']->value);?>
</textarea>
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['text_2'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
</div>
</div>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['text_3'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="text_3">Testo 3</label>
<div class="controls col-md-9">
<textarea class="form-control textarea-large" id="text_3" name="text_3" data-behaviour="ckeditor"><?php echo _f('text_3',$_smarty_tpl->tpl_vars['content']->value);?>
</textarea>
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['text_3'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3" for="gallery">Immagini gallery</label>
<div class="controls col-md-9">
<?php $_smarty_tpl->tpl_vars["images"] = new Smarty_Variable(_fupload('images',$_smarty_tpl->tpl_vars['content']->value), null);
$_smarty_tpl->ext->_updateScope->updateScope($_smarty_tpl, "images", 0);?>
<input id="gallery" type="file" data-behaviour="fileupload" data-url="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/blog-articles/upload" class="form-control" multiple>
<table class="table table-striped mt10"<?php if (!$_smarty_tpl->tpl_vars['images']->value) {?> style="display: none"<?php }?>>
<tbody>
<?php
$_from = $_smarty_tpl->tpl_vars['images']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
$__foreach_image_0_saved_item = isset($_smarty_tpl->tpl_vars['image']) ? $_smarty_tpl->tpl_vars['image'] : false;
$_smarty_tpl->tpl_vars['image'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['image']->_loop = false;
foreach ($_from as $_smarty_tpl->tpl_vars['image']->value) {
$_smarty_tpl->tpl_vars['image']->_loop = true;
$__foreach_image_0_saved_local_item = $_smarty_tpl->tpl_vars['image'];
?>
<tr>
<td width="45%">
<?php echo $_smarty_tpl->tpl_vars['image']->value['name'];?>
</td>
<td width="15%" class="text-right">
<input type="hidden" name="images[]" value="<?php echo htmlentities(json_encode($_smarty_tpl->tpl_vars['image']->value));?>
">
<?php echo round($_smarty_tpl->tpl_vars['image']->value['size']/1024);?>
kb
</td>
<td width="20%">
-
</td>
<td width="20%" class="text-right">
<a href="#" class="btn btn-default btn-xs btn-danger" data-behaviour="fileupload-remove">
<i class="glyphicon-remove glyphicon"></i> Rimuovi
</a>
</td>
</tr>
<?php
$_smarty_tpl->tpl_vars['image'] = $__foreach_image_0_saved_local_item;
}
if ($__foreach_image_0_saved_item) {
$_smarty_tpl->tpl_vars['image'] = $__foreach_image_0_saved_item;
}
?>
</tbody>
</table>
<?php echo '<script'; ?>
type="text/html">
<tr>
<td width="45%">
<?php echo '<%';?>= file.name <?php echo '%>';?>
</td>
<td width="15%" class="text-right">
<?php echo '<%';?>= Math.round(file.size / 1024) || 1 <?php echo '%>';?> kb
</td>
<td width="20%">
<?php echo '<%';?> if (status == 0) { <?php echo '%>';?>
<div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100">
<div class="bar" style="width:0%;"></div>
</div>
<?php echo '<%';?> } else if (status == 1) { <?php echo '%>';?>
<input type="hidden" name="images[]" value="<?php echo '<%';?>= _.escape(result) <?php echo '%>';?>">
<span class="label label-success">Completato</span>
<?php echo '<%';?> } else if (status == 2) { <?php echo '%>';?>
<span class="label">Annullato</span>
<?php echo '<%';?> } else if (status == 3) { <?php echo '%>';?>
<span class="label label-important">Errore</span>
<?php echo '<%';?> } <?php echo '%>';?>
</td>
<td width="20%" class="text-right">
<?php echo '<%';?> if (status == 0) { <?php echo '%>';?>
<a href="#" class="btn btn-default btn-xs btn-danger" data-behaviour="fileupload-cancel">
<i class="glyphicon-ban-circle glyphicon"></i> Annulla
</a>
<?php echo '<%';?> } else { <?php echo '%>';?>
<a href="#" class="btn btn-default btn-xs btn-danger" data-behaviour="fileupload-remove">
<i class="glyphicon-remove glyphicon"></i> Rimuovi
</a>
<?php echo '<%';?> } <?php echo '%>';?>
</td>
</tr>
<?php echo '</script'; ?>
>
</div>
</div>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['class'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="class">Classi CSS</label>
<div class="controls col-md-9">
<input type="text" class="form-control" id="class" name="class" value="<?php echo _f('class',$_smarty_tpl->tpl_vars['content']->value);?>
">
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['class'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
<p class="help-block">Classi CSS, separate da uno spazio, da aggiungere all'elemento contenitore del blocco, es. <code>text-center</code> o <code>text-right</code>.</p>
</div>
</div>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['style'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="style">Stile CSS</label>
<div class="controls col-md-9">
<textarea class="form-control textarea-large textarea-monospace" id="style" name="style" rows="5"><?php echo _f('style',$_smarty_tpl->tpl_vars['content']->value);?>
</textarea>
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['style'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
<p class="help-block">
Stili CSS inseriti all'interno del tag <code>head</code> dell'articolo.
<?php if (isset($_smarty_tpl->tpl_vars['content']->value['id'])) {?>L'elemento contenitore di questo blocco ha id <code>#content-<?php echo $_smarty_tpl->tpl_vars['content']->value['id'];?>
</code>.<?php }?>
</p>
</div>
</div>
</fieldset>
<fieldset class="mt30">
<legend>Impostazioni di pubblicazione</legend>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['published'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="published">Pubblicato</label>
<div class="controls col-md-9">
<div class="checkbox">
<label>
<input type="checkbox" name="published" value="1"<?php if (_f('published',$_smarty_tpl->tpl_vars['content']->value)) {?> checked="checked"<?php }?>>
</label>
</div>
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['published'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
</div>
</div>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['published_datetime'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="published_datetime">Data/Ora di pubblicazione</label>
<div class="controls col-md-9">
<?php echo _datetime_combos("published_datetime",_d('published_datetime',$_smarty_tpl->tpl_vars['content']->value),-1,1);?>
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['published_datetime'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
</div>
</div>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['published_datetime2'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="published_datetime2">Data/Ora di fine pubblicazione</label>
<div class="controls col-md-9">
<?php echo _datetime_combos("published_datetime2",_d('published_datetime2',$_smarty_tpl->tpl_vars['content']->value),-1,1);?>
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['published_datetime2'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
</div>
</div>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['condition'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="condition">Condizione</label>
<div class="controls col-md-9">
<select name="condition" class="form-control"<?php if (_request('delete')) {?> readonly<?php }?>>
<?php echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['PAGE_CONTENT_CONDITIONS']->value,'selected'=>_f('condition',$_smarty_tpl->tpl_vars['content']->value)),$_smarty_tpl);?>
</select>
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['type'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
</div>
</div>
</fieldset>
<?php }?>
<div class="form-group form-actions"><div class="col-md-offset-3 col-md-9">
<?php if (_request('delete')) {?>
<button type="submit" name="delete" value="1" class="btn btn-danger">Elimina il blocco di contenuto</button>
<?php } else { ?>
<button type="submit" class="btn btn-success">Salva le modifiche</button>
<?php }?>
<a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/blog-articles/<?php echo $_smarty_tpl->tpl_vars['article']->value['id'];?>
" class="btn btn-default">Annulla</a>
</div></div>
</form>
</div>
</div>
<?php
}
/* {/block 'content'} */
}