97 lines
5.5 KiB
HTML
97 lines
5.5 KiB
HTML
|
{include file=$header_admin title="Создать категорию"}
|
||
|
|
||
|
<input type="hidden" id="parent_id" value="{$smarty.get.id}"> {* вышестоящая категория, если она есть *}
|
||
|
<input type="hidden" id="del_id" value="">{* Ид удаляемого контента *}
|
||
|
<nav aria-label="breadcrumb">
|
||
|
<ol class="breadcrumb">
|
||
|
<li class="breadcrumb-item"><a href="/admin/">Главная</a></li>
|
||
|
<li class="breadcrumb-item"><a href="/a_tovar_cat/">Товары</a></li>
|
||
|
<li class="breadcrumb-item active" aria-current="page">Редактирование категории</li>
|
||
|
</ol>
|
||
|
</nav>
|
||
|
|
||
|
<div class="ibox">
|
||
|
<div class="ibox-head">
|
||
|
<div class="ibox-title">{if $smarty.get.id}Редактирование категории - <b>{$tovar[0].txt|delKov}</b>{else}Новая категория{/if}</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>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="ibox-body">
|
||
|
<div class="tab-content">
|
||
|
<div class="tab-pane fade show active" id="tab-8-1">
|
||
|
|
||
|
<input type="text" class="form-control mb-3" id="searchCat" name="qs" placeholder="Попытаться найти, чтобы не плодить">
|
||
|
|
||
|
<h4>Найдено: </h4>
|
||
|
<table class="table" id="searchResult"></table>
|
||
|
|
||
|
<form method="post" action="">
|
||
|
{if ($smarty.get.id)}
|
||
|
<input type="hidden" value="editCat" name="act">
|
||
|
{else}
|
||
|
<input type="hidden" value="addCat" name="act">
|
||
|
{/if}
|
||
|
<div class="mb-3">
|
||
|
<label for="exampleInputEmail1" class="form-label">Наименование категории</label>
|
||
|
<input type="text" class="form-control" name="txt" value="{$tovar[0].txt|delKov}">
|
||
|
</div>
|
||
|
|
||
|
<div class="mb-3">
|
||
|
<label for="exampleInputPassword1" class="form-label">Вышестоящая категория</label>
|
||
|
<select name="parent" class="form-control mt-3" id="input_parrent">
|
||
|
<option value="">Нет</option>
|
||
|
{section name=customer loop=$cats} {if $cats[customer].id}
|
||
|
<option value="{$cats[customer].id}" {if $cats[customer].id==$tovar[0].parent} selected{/if}>{$cats[customer].txt}</option>
|
||
|
{/if} {/section}
|
||
|
</select>
|
||
|
</div>
|
||
|
|
||
|
<div class="mb-3 form-check pl-3">
|
||
|
<input type="checkbox" class="form-check-input" id="exampleCheck1" name="public" {if $tovar[0].public==1}checked{/if}>
|
||
|
<label class="form-check-label" for="exampleCheck1">Публиковать</label>
|
||
|
</div>
|
||
|
|
||
|
<button type="submit" class="btn btn-primary">Сохранить</button>
|
||
|
</form>
|
||
|
</div>
|
||
|
<div class="tab-pane" id="tab-8-2">
|
||
|
<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>
|
||
|
{section name=customer loop=$imgs} {if $imgs[customer].id}
|
||
|
<div class="card mb-3 mt-3" style="max-width: 90%;" id="{$imgs[customer].id}">
|
||
|
<div class="row g-0">
|
||
|
<div class="col-md-4">
|
||
|
<img src="/img/tovar/{$imgs[customer].fileName}.jpg" class="img-fluid rounded-start" alt="...">
|
||
|
</div>
|
||
|
<div class="col-md-8">
|
||
|
<div class="card-body">
|
||
|
<h5 class="card-title">Имя файла: {$imgs[customer].fileName}</h5>
|
||
|
<p class="card-text"><input type="text" class="form-control" name="alt" placeholder="alt"></p>
|
||
|
<p class="card-text"><input type="text" class="form-control" name="title" placeholder="Title"></p>
|
||
|
<p class="card-text"><small class="text-muted delImg" data-id="{$imgs[customer].id}" style="cursor: pointer;">Удалить</small></p>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
{/if} {/section}
|
||
|
</div>
|
||
|
</div>
|
||
|
<br>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!-- script language="javascript" type="text/javascript" src="/api/soft/tinymce/4.3.12/tinymce.min.js"></script><script language="javascript" type="text/javascript" src="/api/soft/tinymce/4.3.12/load.php"></script -->
|
||
|
<!-- Футер -->
|
||
|
{include file=$footer_admin}
|