320 lines
13 KiB
HTML
Executable File
320 lines
13 KiB
HTML
Executable File
{if $smarty.session.dostup=='a' || $smarty.session.dostup=='e'}
|
|
{include file=$header_admin title="Создать страницу" h1="Новая страница" settings_mod="1"}
|
|
{else}
|
|
{include file=$header title="Создать страницу" h1="Новая страница"}
|
|
{/if}
|
|
|
|
|
|
<input type="hidden" id="global_id" value="{$smarty.get.id}">
|
|
|
|
<h1 class="title text-center">
|
|
<!-- i class="fa fa-cog" style="font-size: 25pt;" title="Настройки" data-toggle="modal" data-target="#mod_settings"></i -->
|
|
</h1>
|
|
<!-- form id="form__upload_main_img" action="" method="post" style="display: none;">
|
|
<input type="file" name="main_img" id="input__main_img">
|
|
<input type="hidden" name="act" value="upload_main_img">
|
|
<input type="hidden" name="id" value="{$smarty.const.ID}">
|
|
<input type="hidden" name="mod" value="{$smarty.const.MOD}">
|
|
|
|
</form -->
|
|
|
|
<div class="ibox">
|
|
<div class="ibox-head">
|
|
{if ($smarty.get.id)}
|
|
<div class="ibox-title">Редактирование страницы: {$page.title}</div>
|
|
{else}
|
|
<div class="ibox-title">Список страниц</div>
|
|
{/if}
|
|
<ul class="nav nav-tabs tabs-line pull-right">
|
|
<li class="nav-item">
|
|
<a class="nav-link active" href="#tab-8-0" data-toggle="tab"><i class="fa-solid fa-bars"></i>Дочерние
|
|
страницы</a>
|
|
</li>
|
|
{if ($smarty.get.id)}
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="#tab-8-1" data-toggle="tab"><i class="fa fa-taxi"></i>Редактор</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="#tab-8-2" data-toggle="tab"><i class="fa fa-bus"></i> Картинки</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="#tab-8-5" data-toggle="tab"><i class="fa fa-bus"></i> Вложения</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="#tab-8-4" data-toggle="tab"><i class="fa fa-plane"></i> Опции</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="#tab-8-3" data-toggle="tab"><i class="fa fa-plane"></i> SEO</a>
|
|
</li>
|
|
{/if}
|
|
</ul>
|
|
</div>
|
|
<div class="ibox-body">
|
|
<div class="tab-content">
|
|
<div class="tab-pane fade show active" id="tab-8-0">
|
|
<form class="input-group" id="formNewPage" action="/act/contenteditor">
|
|
<input type="text" placeholder="Новая страница" class="form-control" name="title">
|
|
<input type="hidden" value="newpage" name="act">
|
|
{if ($smarty.get.id)}
|
|
<input type="hidden" value="{$smarty.get.id}" name="category">
|
|
{else}
|
|
<input type="hidden" value="0" name="category">
|
|
{/if}
|
|
<button type="submit" class="btn btn-dark">Создать</button>
|
|
</form>
|
|
|
|
<table class="table" id="filter-table">
|
|
|
|
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">ID</th>
|
|
<th scope="col">Заголовок</th>
|
|
<th scope="col">Сортировка</th>
|
|
|
|
<th scope="col">Показывать в новостях</th>
|
|
<th scope="col">Действия</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tr class='table-filters'>
|
|
<td>
|
|
<input type="text" class="form-control">
|
|
</td>
|
|
<td>
|
|
<input type="text" class="form-control">
|
|
</td>
|
|
<td>
|
|
|
|
</td>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
|
|
{if ($smarty.get.id)}
|
|
|
|
<tr class='table-data' id="li_{$childrenPages[customer].id}">
|
|
<td><a href="/contenteditor/{$page.category}">..</a></td>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
<li></li>{/if}
|
|
|
|
{section name=customer loop=$childrenPages}
|
|
<tr class='table-data' id="li_{$childrenPages[customer].id}">{* style="background-color:
|
|
#{$childrenPages[customer].color};"*}
|
|
<td>{$childrenPages[customer].id}</td>
|
|
<td><a href="/contenteditor/{$childrenPages[customer].id}">{$childrenPages[customer].title}</a>
|
|
<a href="/content/{$childrenPages[customer].id}" title="Открыть на сайте" target="_blank"><i
|
|
class="fa-solid fa-up-right-from-square"></i></a></td>
|
|
<td><input class="form-control changeSort" value="{$childrenPages[customer].sort}"
|
|
data-id="{$childrenPages[customer].id}"></td>
|
|
<td style="text-align: center;"><input type="checkbox" data-id="{$childrenPages[customer].id}"
|
|
class="tonews" {if ($childrenPages[customer].tonews==1)} checked{/if}></td>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<input type="checkbox" title="Публиковать?" data-id="{$childrenPages[customer].id}"
|
|
class="checkboxStatus" {if ($childrenPages[customer].status==1)} checked{/if}>
|
|
|
|
|
|
|
|
<input type="checkbox" title="Показывать в меню?" data-id="{$childrenPages[customer].id}"
|
|
class="showOnRight" {if ($childrenPages[customer].showOnRight==1)} checked{/if}>
|
|
|
|
<button class="btn btn-dark delPage"
|
|
data-id="{$childrenPages[customer].id}">Удалить</button>
|
|
</td>
|
|
</tr>
|
|
{/section}
|
|
</table>
|
|
|
|
|
|
</div>
|
|
{*
|
|
------------------------------------------------------------------------------------------------------------------------
|
|
*}
|
|
<div class="tab-pane fade" id="tab-8-5">
|
|
|
|
|
|
|
|
<form action="" method="post" enctype='multipart/form-data' id="formFilesUpload" class="input-group">
|
|
|
|
<input class="form-control" name="file" type="file" id="inputFileUpload">
|
|
|
|
|
|
</form>
|
|
|
|
|
|
<table class="table files">
|
|
|
|
<tr>
|
|
|
|
<td style="width:26%">
|
|
<b>Имя файла</b>
|
|
</td>
|
|
|
|
<td style="width:26%">
|
|
<b>Ссылка</b>
|
|
</td>
|
|
|
|
<td style="width:26%">
|
|
<b>Псевдоним</b>
|
|
</td>
|
|
|
|
<td>
|
|
|
|
</td>
|
|
</tr>
|
|
{section name=customer loop=$files}
|
|
|
|
<tr id="f_{$files[customer].id}">
|
|
|
|
<td>
|
|
{$files[customer].title}
|
|
</td>
|
|
|
|
<td>
|
|
https://{$smarty.server.SERVER_NAME}{$files[customer].txt}
|
|
</td>
|
|
|
|
<td>
|
|
<input type="text" value="{$files[customer].json}" class="form-control"
|
|
data-id="{$files[customer].id}">
|
|
</td>
|
|
|
|
<td>
|
|
<i class="fa-solid fa-trash" title="Удалить" style="cursor:pointer;"
|
|
data-id="{$files[customer].id}"></i>
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
|
|
{/section}
|
|
|
|
</table>
|
|
|
|
|
|
</div>
|
|
{*
|
|
------------------------------------------------------------------------------------------------------------------------
|
|
*}
|
|
<div class="tab-pane fade" id="tab-8-1">
|
|
{if ($smarty.get.id)}
|
|
<a href="/content/{$smarty.get.id}" type="button" class="btn btn-primary" target="_blank">Посмотреть на
|
|
сайте</a>
|
|
<a href="/contenteditor/" type="button" class="btn btn-primary">Создать еще страницу</a>
|
|
{include file=$editor}
|
|
{/if}
|
|
|
|
</div>
|
|
<div class="tab-pane" id="tab-8-2">
|
|
<h3>Первая картинка - главная</h3>
|
|
|
|
<div id="drop-area" class="container mt-2">
|
|
<form class="my-form">
|
|
<p>Загрузите фотографии</p>
|
|
<input type="file" id="fileElem" multiple accept="image/*" onchange="handleFiles(this.files)">
|
|
<label class="button" for="fileElem">Выбрать файлы</label>
|
|
</form>
|
|
<progress id="progress-bar" max=100 value=0></progress>
|
|
<div id="gallery"></div>
|
|
</div>
|
|
<table class="table">
|
|
{section name=customer loop=$img}
|
|
<tr id="{$img[customer]}">
|
|
<td style="width: 200px;">
|
|
<img src="/api/img/gray/gif/gray.gif" class="lazy" data-original="{$img[customer]}"
|
|
style="width: 100%;">
|
|
</td>
|
|
<td>
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
{/section}
|
|
</table>
|
|
</div>
|
|
<div class="tab-pane fade" id="tab-8-3">
|
|
<!-- SEO -->
|
|
|
|
<input class="form-control mt-2" name="keywords" id="input_keywords" placeholder="Ключевые слова"
|
|
value="{$arr.keywords}">
|
|
<input class="form-control mt-2" name="description" id="input_description"
|
|
placeholder="Описание страницы" value="{$arr.description}">
|
|
<button type="button" class="btn btn-dark mt-2" id="btn_save_keywords">Сохранить</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{if ($smarty.get.id)}
|
|
<div class="tab-pane fade" id="tab-8-4">
|
|
<!-- опции -->
|
|
<div class="container">
|
|
|
|
|
|
<p>Поместить в категорию:</p>
|
|
<div class="input-group mb-3">
|
|
<select name="category" class="form-control mt-3" id="catList">
|
|
<option value="0">Нет</option>
|
|
{section name=customer loop=$pages_category}
|
|
{if $pages_category[customer].id}
|
|
|
|
<option value="{$pages_category[customer].id}" {if
|
|
$page.category==$pages_category[customer].id}selected{/if}>
|
|
{$pages_category[customer].title}</option>
|
|
{/if}
|
|
{/section}
|
|
</select>
|
|
|
|
<button type="button" class="btn btn-dark mt-2" id="btn_changeCat">Сохранить</button>
|
|
|
|
</div>
|
|
<div class="form-check">
|
|
<input class="form-check-input page-option" type="checkbox" value="" data-pole="socbtn"
|
|
data-id="{$smarty.get.id}" {if ($page[0].socbtn)}checked{/if}>
|
|
<label class="form-check-label" for="flexCheckDefault">
|
|
Блок социальных кнопок
|
|
</label>
|
|
</div>
|
|
|
|
|
|
<div class="form-check">
|
|
<input class="form-check-input page-option" type="checkbox" value="" data-pole="comment"
|
|
data-id="{$smarty.get.id}" {if ($page[0].comment)}checked{/if}>
|
|
<label class="form-check-label" for="flexCheckDefault">
|
|
Разрешить коментарии
|
|
</label>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
{/if}
|
|
</div>
|
|
<br>
|
|
<div id="div_log" style="border: 1px solid gray; border-radius: 10px; padding:15px;">
|
|
<p><b>Лог:</b></p>
|
|
</div>
|
|
|
|
<a href="/editmod/contenteditor" target="_blank" type="button" class="btn btn-danger"><i
|
|
class="fa-solid fa-gear"></i></a>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{if $smarty.session.dostup=='a' || $smarty.session.dostup=='e'} {include file=$footer_admin} {else} {include
|
|
file=$footer} {/if} |