core/api/modules/blog_edit/index.html

55 lines
2.8 KiB
HTML

{include file=$header title="Создать страницу"} {if ($smarty.get.id)} {else}
<h1 class="text-center">Новый блог</h1>
{/if}
<section class="container">
<form action="/blog_edit/{$smarty.get.id}" method="post" enctype='multipart/form-data'>
<input type='hidden' id='input-id' value='{$smarty.get.id}'>
<input type='text' name='title' class="form-control" value='{$page[0].title}' placeholder="Введите заголовок страницы">
<textarea tabindex='2' name='txt' id='editarea' style="height: 600px;">{$page[0].txt}</textarea>
<input type='text' name='description' class="form-control" value='{$page[0].description}' placeholder="description">
<input type='text' name='keywords' class="form-control" value='{$page[0].keywords}' placeholder="keywords">
<input type='text' name='d' class="form-control" value='{if $page[0].d}{$page[0].d}{else}{$smarty.now|date_format:"%d.%m.%Y"}{/if}' placeholder="2017-12-31">
<b>Публиковать?</b>
<select name="public" class="form-control">
<option value="0">Нет</option>
<option value="1" {if $page[0].public==1}selected{/if}>Да</option>
</select> {if $smarty.session.dostup=='a'}
<b>Разрешить коментарии?</b>
<select name="comments" class="form-control">
<option value="0">Нет</option>
<option value="1" {if $page[0].comments==1}selected{/if}>Да</option>
</select>
<b>Показывать социальные кнопки?</b>
<select name="show_soc_btn" class="form-control">
<option value="0">Нет</option>
<option value="1" {if $page[0].show_soc_btn==1}selected{/if}>Да</option>
</select> {/if}
<b>Категория</b>
<select name="parent" class="form-control">
<option value="0">Нет</option>
{section name=customer loop=$list}
{if $list[customer].id}{assign var=json value=$list[customer].json|uns}
<option value="{$list[customer].id}" {if $page[0].cat==$list[customer].id}selected{/if}>{$json.title}</option>
{/if}
{/section}
</select>
<b>Обложка</b>
<input type="file" name="oblozhka" class="btn btn-default" id="input-oblozhka"> {if $page[0].oblozhka}
<img src="/img/pages/{$page[0].oblozhka}.jpg" id="img-oblozhka" style="width: 190px;">
<br>
<a href="{$smarty.get.id}" id="del_obl">Удалить обложку</a> {/if}
<br>
<b>Показывать обложку на странице</b>
<select name="oblozhka_show" class="form-control">
<option value="0">Нет</option>
<option value="1" {if $page[0].oblozhka_show==1}selected{/if}>Да</option>
</select>
<input type='submit' value='Сохранить' tabindex='5' name="ok" class="btn btn-outline-dark">
</form>
{$editor}
</section> {include file=$footer}