virt2/api/mod/page_edit.html

122 lines
6.2 KiB
HTML
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{include file=$header_admin title="Создать страницу" h1="Новая страница"}
<div id="tabs">
<ul>
<li><a href="#main_info">Основная информация</a></li>
<li><a href="#sv_docs">Связанные документы</a></li>
{if $smarty.get.id}
<li><a href="#sv_img">Картинки</a></li>
{/if}
</ul>
<div id="main_info">
<form action="/page_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" tabindex='1' 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" tabindex='3' value='{$page[0].description}' placeholder="description">
<input type='text' name='keywords' class="form-control" tabindex='4' value='{$page[0].keywords}' placeholder="keywords">
<input type='text' name='d' class="form-control" tabindex='5' value='{if $page[0].d}{$page[0].d}{else}{$smarty.now|date_format:"%Y-%m-%d"}{/if}' placeholder="2017-12-31">
<input type='text' name='alias' class="form-control" tabindex='6' value='{$page[0].alias}' placeholder="ЧПУ/Алиас">
<input type='text' name='rdir' class="form-control" tabindex='6' value='{$page[0].rdir}' placeholder="301-й редирект на новую страницу">
<b>Публиковать?</b>
<select name="public" class="form-control">
<option value="0">Нет</option>
<option value="1" {if $page[0].public==1}selected{/if}>Да</option>
</select>
<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>
<b>Показывать форму сбор денег</b>
<select name="sbor_deneg" class="form-control">
<option value="0">Нет</option>
<option value="1" {if $page[0].sbor_deneg==1}selected{/if}>Да</option>
</select>
<b>Категория</b>
<select name="cat" class="form-control">
<option value="0">Нет</option>
{section name=customer loop=$list}
{if $list[customer].id}
<option value="{$list[customer].id}" {if $page[0].cat==$list[customer].id}selected{/if}>{$list[customer].txt}</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>
{if ($smarty.get.id)}
<p>Файлы:</p>
<input type="file" name="file"><button type="button" class="btn btn-outline-success">Загрузить</button>
{/if}
{*<p><b>Дополнительные изображения</b></p>
<input type=file name=img1 class="form-control">
<input type=file name=img2 class="form-control">
<input type=file name=img3 class="form-control">
<input type=file name=img4 class="form-control">*}
<p><b>Внешние ссылки</b></p>
<input type='text' name='link_yandex_disk' class="form-control" value='{$page[0].link_yandex_disk}' placeholder="Яндекс-диск">
<input type='text' name='link_yandex_disk_txt' class="form-control" value='{$page[0].link_yandex_disk_txt}' placeholder="Текст ссылки">
<input type='text' name='link_my_disk' class="form-control" value='{$page[0].link_my_disk}' placeholder="Свое облако">
<input type='text' name='link_my_disk_txt' class="form-control" value='{$page[0].link_my_disk_txt}' placeholder="Текст ссылки">
<center>
<input type='submit' value='Сохранить' tabindex='5' name="ok" class="btn btn-outline-success">
</center>
</form>
{if ($smarty.get.id)}
<form action='/act/page_edit' method='post' style="margin-top: 20px;" id="form-load-keywords">
<input type="hidden" name='act' value='load-keywords'>
<input type="hidden" name='page_id' value='{$smarty.get.id}'>
<input type="file" name="keys" id="input_keys">
<input type="submit" value="Загрузить список ключевых слов">
</form>
{/if}
{$editor}
</div>
<div id="sv_docs">
</div>
{if $smarty.get.id}
<div id="sv_img">
<button type="button" class="btn btn-info" id="btn-upload">Добавить картинку</button>
<div class="row" id="div_preload">
{section name=customer loop=$img}
{if $img[customer].id}
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3 col-xl-3" id="img_{$img[customer].id}">
<img src="/img/pages/{$img[customer].img}_150_150.jpg" style="width: 100%">
<p class="text-center">
<a href="{$img[customer].id}" data-img="{$img[customer].img}" class="a_del_img">Удалить</a>
</p>
</div>
{/if}
{/section}
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3 col-xl-3">
<form action="" method="post" id="upload-image">
<input type="hidden" name="act" value="upload">
<input type="hidden" name="id" value="{$smarty.get.id}">
<input type="file" name="img2" style="display:none;" id="input-img2">
{*<img src="/api/img/addimg/1.png" id="img-img2" style="width:100%; background-color:lightgray;">*}
</form>
</div>
</div>
</div>
{/if}
</div>
<link rel="stylesheet" href="/api/jquery/jquery-ui/dark-hive1.12.1/jquery-ui.css">
<link rel="stylesheet" href="/api/jquery/jquery-ui/dark-hive1.12.1/jquery-ui.theme.min.css">
{include file=$footer_admin}