File "3602c134dc2885aa499d502b4d6e184871863de4_0.file.admin-pages-edit.tmpl.php"
Full Path: /srv/www/www.cadoro.it/src/templates_c/3602c134dc2885aa499d502b4d6e184871863de4_0.file.admin-pages-edit.tmpl.php
File size: 19.78 KB
MIME-type: text/x-php
Charset: utf-8
<?php
/* Smarty version 3.1.29, created on 2024-02-22 07:51:27
from "/srv/www/www.cadoro.it/src/templates/admin-pages-edit.tmpl" */
if ($_smarty_tpl->smarty->ext->_validateCompiled->decodeProperties($_smarty_tpl, array (
'has_nocache_code' => false,
'version' => '3.1.29',
'unifunc' => 'content_65d6eeef626402_13501855',
'file_dependency' =>
array (
'3602c134dc2885aa499d502b4d6e184871863de4' =>
array (
0 => '/srv/www/www.cadoro.it/src/templates/admin-pages-edit.tmpl',
1 => 1708527642,
2 => 'file',
),
),
'includes' =>
array (
'file:layout-admin.tmpl' => 1,
),
),false)) {
function content_65d6eeef626402_13501855 ($_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_70719858765d6eeef5bc491_10027606',
1 => false,
3 => 0,
2 => 0,
));
?>
<?php
$_smarty_tpl->ext->_inheritance->processBlock($_smarty_tpl, 0, "content", array (
0 => 'block_50647769465d6eeef5bf404_79925175',
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-pages-edit.tmpl */
function block_70719858765d6eeef5bc491_10027606($_smarty_tpl, $_blockParentStack) {
?>
<div class="breadcrumbs">
<a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/pages">Pagine</a> <span class="divider">»</span>
<strong><?php echo $_smarty_tpl->tpl_vars['page']->value['slug'];?>
</strong>
</div>
<?php
}
/* {/block 'breadcrumbs'} */
/* {block 'content'} file:admin-pages-edit.tmpl */
function block_50647769465d6eeef5bf404_79925175($_smarty_tpl, $_blockParentStack) {
?>
<div class="sheet">
<div class="sheet-header">
<h1>
Modifica pagina
<small><?php echo $_smarty_tpl->tpl_vars['page']->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>Informazioni di base</legend>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['lang'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="lang">Lingua</label>
<div class="controls col-md-9">
<select name="lang" class="form-control">
<option value=""></option>
<?php echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['LANGUAGES']->value,'selected'=>_f('lang',$_smarty_tpl->tpl_vars['page']->value)),$_smarty_tpl);?>
</select>
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['lang'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
</div>
</div>
<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['page']->value);?>
">
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['slug'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
<p class="help-block">
Inserire lo SLUG della pagina, es. <code>/</code> per la home page, <code>/contatti</code> per la pagina contatti.<br>
È anche possibile inserire SLUG di secondo livello, es. <code>/sezione/pagina</code>.
</p>
</div>
</div>
<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['page']->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['page']->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">
<label class="control-label col-md-3" for="link">Link</label>
<div class="controls col-md-9">
<input type="text" class="form-control" id="link" name="link" value="<?php echo _f('link',$_smarty_tpl->tpl_vars['page']->value);?>
">
</div>
</div>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['hero'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="hero">Immagine hero</label>
<div class="controls col-md-9">
<input type="file" class="form-control" id="hero" name="hero" value="">
<?php if (isset($_smarty_tpl->tpl_vars['page']->value['hero']) && $_smarty_tpl->tpl_vars['page']->value['hero']) {?>
<p class="mt20">
<input type="hidden" name="hero" value="<?php echo $_smarty_tpl->tpl_vars['page']->value['hero'];?>
">
<img src="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/assets/<?php echo $_smarty_tpl->tpl_vars['page']->value['hero'];?>
" alt="immagine hero" class="img-responsive img-editable" id="img_hero">
</p>
<?php }?>
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['hero'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
</div>
</div>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['hero_mobile'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="hero_mobile">Immagine hero mobile</label>
<div class="controls col-md-9">
<input type="file" class="form-control" id="hero_mobile" name="hero_mobile" value="">
<?php if (isset($_smarty_tpl->tpl_vars['page']->value['hero_mobile']) && $_smarty_tpl->tpl_vars['page']->value['hero_mobile']) {?>
<p class="mt20">
<input type="hidden" name="hero_mobile" value="<?php echo $_smarty_tpl->tpl_vars['page']->value['hero_mobile'];?>
">
<img src="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/assets/<?php echo $_smarty_tpl->tpl_vars['page']->value['hero_mobile'];?>
" alt="immagine hero mobile" class="img-responsive img-editable" id="img_hero">
</p>
<?php }?>
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['hero'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
</div>
</div>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['hero_video'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="hero_video">Codice Video Youtube</label>
<div class="controls col-md-9">
<input type="text" class="form-control" id="hero_video" name="hero_video" <?php if (isset($_smarty_tpl->tpl_vars['page']->value['hero_video']) && $_smarty_tpl->tpl_vars['page']->value['hero_video']) {?> value="<?php echo $_smarty_tpl->tpl_vars['page']->value['hero_video'];?>
" <?php }?>>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3" for="extra_props">Proprietà video</label>
<div class="controls col-md-9">
<select name="extra_props" class="form-control">
<option value="">Seleziona...</option>
<option value="1" <?php if (isset($_smarty_tpl->tpl_vars['page']->value['extra_props']) && $_smarty_tpl->tpl_vars['page']->value['extra_props'] == 1) {?> selected <?php }?>>Autoplay</option>
<option value="2" <?php if (isset($_smarty_tpl->tpl_vars['page']->value['extra_props']) && $_smarty_tpl->tpl_vars['page']->value['extra_props'] == 2) {?> selected <?php }?>>Loop</option>
</select>
</div>
</div>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['header'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="header">Immagine header</label>
<div class="controls col-md-9">
<input type="file" class="form-control" id="header" name="header" value="">
<?php if (isset($_smarty_tpl->tpl_vars['page']->value['header']) && $_smarty_tpl->tpl_vars['page']->value['header']) {?>
<p class="mt20">
<input type="hidden" name="header" value="<?php echo $_smarty_tpl->tpl_vars['page']->value['header'];?>
">
<img src="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/assets/<?php echo $_smarty_tpl->tpl_vars['page']->value['header'];?>
" alt="immagine header" class="img-responsive img-editable" id="img_header">
</p>
<?php }?>
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['header'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3" for="content">Contenuto</label>
<div class="controls col-md-9">
<div class="table-responsive">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th style="width: 80px">Posizione</th>
<th style="width: 80px">ID</th>
<th>Nome</th>
<th>Tipo contenuto</th>
<th class="text-center" style="width: 140px;">Azioni</th>
</tr>
</thead>
<tbody>
<?php
$_from = $_smarty_tpl->tpl_vars['page']->value->content();
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
$__foreach_c_0_saved_item = isset($_smarty_tpl->tpl_vars['c']) ? $_smarty_tpl->tpl_vars['c'] : false;
$_smarty_tpl->tpl_vars['c'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['c']->_loop = false;
foreach ($_from as $_smarty_tpl->tpl_vars['c']->value) {
$_smarty_tpl->tpl_vars['c']->_loop = true;
$__foreach_c_0_saved_local_item = $_smarty_tpl->tpl_vars['c'];
?>
<tr>
<td>
<a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/pages/<?php echo $_smarty_tpl->tpl_vars['page']->value['id'];?>
/<?php echo $_smarty_tpl->tpl_vars['c']->value['id'];?>
">#<?php echo $_smarty_tpl->tpl_vars['c']->value['sorting'];?>
</a>
</td>
<td>
<a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/pages/<?php echo $_smarty_tpl->tpl_vars['page']->value['id'];?>
/<?php echo $_smarty_tpl->tpl_vars['c']->value['id'];?>
"><?php echo $_smarty_tpl->tpl_vars['c']->value['id'];?>
</a>
</td>
<td>
<a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/pages/<?php echo $_smarty_tpl->tpl_vars['page']->value['id'];?>
/<?php echo $_smarty_tpl->tpl_vars['c']->value['id'];?>
"><?php echo (($tmp = @$_smarty_tpl->tpl_vars['c']->value['name'])===null||$tmp==='' ? "—" : $tmp);?>
</a>
</td>
<td>
<?php echo _v($_smarty_tpl->tpl_vars['c']->value['type'],$_smarty_tpl->tpl_vars['PAGE_CONTENT_TYPES']->value);?>
</td>
<td class="text-center">
<a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/pages/<?php echo $_smarty_tpl->tpl_vars['page']->value['id'];?>
/<?php echo $_smarty_tpl->tpl_vars['c']->value['id'];?>
" class="btn btn-xs btn-default">Modifica</a>
<a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/pages/<?php echo $_smarty_tpl->tpl_vars['page']->value['id'];?>
/<?php echo $_smarty_tpl->tpl_vars['c']->value['id'];?>
?delete=1" class="btn btn-xs btn-danger">Elimina</a>
</td>
</tr>
<?php
$_smarty_tpl->tpl_vars['c'] = $__foreach_c_0_saved_local_item;
}
if ($__foreach_c_0_saved_item) {
$_smarty_tpl->tpl_vars['c'] = $__foreach_c_0_saved_item;
}
?>
</tbody>
</table>
<p class="mt20">
<a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/pages/<?php echo $_smarty_tpl->tpl_vars['page']->value['id'];?>
/add" class="btn btn-primary"><i class="glyphicon glyphicon-plus"></i> Nuovo elemento</a>
</p>
</div>
</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['page']->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['page']->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['page']->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>
</fieldset>
<fieldset class="mt30">
<legend>Impostazioni SEO</legend>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['seo_title'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="seo_title">Titolo</label>
<div class="controls col-md-9">
<input type="text" class="form-control" id="seo_title" name="seo_title" value="<?php echo _f('seo_title',$_smarty_tpl->tpl_vars['page']->value);?>
">
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['seo_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['seo_image'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="seo_image">Immagine</label>
<div class="controls col-md-9">
<input type="file" class="form-control" id="seo_image" name="seo_image" value="">
<?php if (isset($_smarty_tpl->tpl_vars['page']->value['seo_image']) && $_smarty_tpl->tpl_vars['page']->value['seo_image']) {?>
<p class="mt20">
<input type="hidden" name="seo_image" value="<?php echo $_smarty_tpl->tpl_vars['page']->value['seo_image'];?>
">
<img src="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/assets/<?php echo $_smarty_tpl->tpl_vars['page']->value['seo_image'];?>
" alt="<?php echo $_smarty_tpl->tpl_vars['page']->value['name'];?>
" class="img-responsive img-editable" id="img_seo_image">
</p>
<?php }?>
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['seo_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['seo_description'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="seo_description">Descrizione</label>
<div class="controls col-md-9">
<input type="text" class="form-control" id="seo_description" name="seo_description" value="<?php echo _f('seo_description',$_smarty_tpl->tpl_vars['page']->value);?>
">
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['seo_description'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
</div>
</div>
<div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['seo_keywords'])) {?> error<?php }?>">
<label class="control-label col-md-3" for="seo_keywords">Keywords</label>
<div class="controls col-md-9">
<input type="text" class="form-control" id="seo_keywords" name="seo_keywords" value="<?php echo _f('seo_keywords',$_smarty_tpl->tpl_vars['page']->value);?>
">
<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['seo_keywords'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
</div>
</div>
</fieldset>
<div class="form-group form-actions"><div class="col-md-offset-3 col-md-9">
<button type="submit" class="btn btn-success">Salva le modifiche</button>
<a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/pages" class="btn btn-default">Annulla</a>
</div></div>
</form>
</div>
</div>
<?php
}
/* {/block 'content'} */
}