core/api/modules/page_edit/index.html

106 lines
4.6 KiB
HTML

{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}
<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">
<div class="ibox-title">Редактирование страницы: {$page[0].title|substr:15}</div>
<ul class="nav nav-tabs tabs-line pull-right">
<li class="nav-item">
<a class="nav-link active" 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-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> Настройки модуля</a>
</li>
</ul>
</div>
<div class="ibox-body">
<div class="tab-content">
<div class="tab-pane fade show active" id="tab-8-1">
{include file=$editor}
</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_list} {if $img_list[customer].id}
<tr>
<td style="width: 200px;">
<img src="/api/img/gray/gif/gray.gif" class="lazy"
data-original="/img/{$smarty.server.SERVER_NAME}/pages/{$smarty.get.id}/{$img_list[customer].filename}.jpg"
style="width: 100%;">
</td>
<td>
<a href="{$img_list[customer].id}" class="del_img btn btn-secondary">Удалить</a>
</td>
</tr>
{/if} {/section}
</table>
</div>
<div class="tab-pane fade" id="tab-8-3">
<!-- Настройки модуля -->
<form class="module-settings" action="/act/page_edit">
<input type="hidden" name="act" value="save-settings">
<h3>Ширина и высота изображений</h3>
<div class="input-group mb-3" style="margin-top: 30px;">
<input type="text" class="form-control" value="{$mainImgW}" placeholder="Ширина" aria-describedby="button-addon2" name="main-img-w">
<input type="text" class="form-control" value="{$mainImgH}" placeholder="Высота" aria-describedby="button-addon2" name="main-img-h">
</div>
<input type="submit" name="ok" value="Сохранить" class="btn btn-outline-secondary">
</form>
</div>
<div class="tab-pane fade" id="tab-8-4">
</div>
</div>
<br>
</div>
</div>
{if $smarty.session.dostup=='a' || $smarty.session.dostup=='e'} {include file=$footer_admin} {else} {include
file=$footer} {/if}