169 lines
8.1 KiB
HTML
Executable File
169 lines
8.1 KiB
HTML
Executable File
{include file=$header_admin h1="Все товары" title="Все товары"}
|
||
<input type="hidden" id="parent_id" value="{$smarty.get.id}"> {* вышестоящая категория, если она есть *}
|
||
<input type="hidden" id="del_id" value="">{* Ид удаляемого контента *}
|
||
{if ($catInfo)}
|
||
<!--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">{$catInfo[0].title}</li>
|
||
</ol>
|
||
</nav -->
|
||
|
||
|
||
<ol class="breadcrumb" style="background-color: transparent;">
|
||
<li class="breadcrumb-item"><a href="/">Главная</a></li>
|
||
<li class="breadcrumb-item"><a href="/a_tovar_cat/0">Каталог</a></li>
|
||
{section name=customer loop=$Breadcrumb}{if ($Breadcrumb[customer].id &&
|
||
$Breadcrumb[customer].id!=$smarty.get.id)}
|
||
<li class="breadcrumb-item"><a
|
||
href="/a_tovar_cat/{$Breadcrumb[customer].id}-">{$Breadcrumb[customer].title}</a></li>
|
||
{/if}{/section}
|
||
<li class="breadcrumb-item active" aria-current="page">{$catInfo[0].title}</li>
|
||
</ol>
|
||
|
||
|
||
|
||
<h1>{$catInfo[0].title}</h1>
|
||
{else}
|
||
<nav aria-label="breadcrumb">
|
||
<ol class="breadcrumb">
|
||
<li class="breadcrumb-item"><a href="/admin/">Главная</a></li>
|
||
<li class="breadcrumb-item active" aria-current="page">Товары</li>
|
||
</ol>
|
||
</nav>
|
||
{/if}
|
||
<div class="ibox">
|
||
<div class="ibox-head">
|
||
<div class="ibox-title">
|
||
Товары
|
||
</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-sharp fa-solid fa-list"></i> Список</a>
|
||
</li>
|
||
{if ($smarty.get.id)}
|
||
<li class="nav-item">
|
||
<a class="nav-link" href="#tab-8-2" data-toggle="tab"><i class="fa-sharp fa-solid fa-list"></i> Свойства категории</a>
|
||
</li>
|
||
<li class="nav-item">
|
||
<a class="nav-link" href="#tab-8-3" data-toggle="tab"><i class="fa-sharp fa-solid fa-list"></i> Изображения</a>
|
||
</li>
|
||
|
||
<li class="nav-item">
|
||
<a class="nav-link" href="#tab-8-4" data-toggle="tab"><i class="fa-sharp fa-solid fa-list"></i> Автофильтр</a>
|
||
</li>
|
||
{/if}
|
||
</ul>
|
||
</div>
|
||
<div class="ibox-body">
|
||
<div class="tab-content">
|
||
<div class="tab-pane fade show active" id="tab-8-1">
|
||
<form action="" method="post" class="input-group mb-2 col-xxl-12 col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12" role="group" aria-label="Basic example">
|
||
<input type="text" name="txt" class="form-control">
|
||
<select class="form-control" name="category">
|
||
<option value="0">Нет</option>
|
||
{section name=customer loop=$catList} {if $catList[customer].id}
|
||
<option value="{$catList[customer].id}" {if $smarty.get.id==$catList[customer].id} selected {/if}>{$catList[customer].title} | ID: {$catList[customer].id}</option>
|
||
{/if} {/section}
|
||
</select>
|
||
<input type="submit" name="move" value="Переместить" class="btn btn-primary">
|
||
</form>
|
||
|
||
|
||
|
||
<div class="btn-group" role="group" aria-label="Basic example">
|
||
<button type="button" data-link="/a_new_tovar/" class="btn btn-primary"><i class="far fa-file" style="margin-right: 7px;"></i>Создать товар</button>
|
||
<a type="button" class="btn btn-primary" href="#modal_new_cat" data-toggle="modal"><i class="fas fa-plus" style="margin-right: 7px;"></i> Новая категория</a>
|
||
|
||
|
||
<button type="button" class="btn btn-primary" data-link="/a_tovar_cat/{$catInfo[0].category}"><i class="fa-solid fa-circle-up" style="margin-right: 7px;"></i> Выше</button>
|
||
|
||
|
||
|
||
<button type="button" class="btn btn-primary" data-link="/a_edit_cat/"><i class="fa-solid fa-circle-up" style="margin-right: 7px;"></i> Отключить пустые</button>
|
||
<label class="ui-checkbox ml-3 mt-1"><input type="checkbox" {if $set.showNoPublic=="1"} checked {/if} id="setShowNoPublic"><span class="input-span"></span>Показывать отключенные</label>
|
||
</div>
|
||
<table class="table">
|
||
<!-- Категории -->
|
||
{include file=$cat_list massiv=$cats}
|
||
<!-- Страницы -->
|
||
{include file=$pages_list massiv=$pages}
|
||
</table>
|
||
|
||
</div>
|
||
{if ($smarty.get.id)}
|
||
<div class="tab-pane" id="tab-8-2">
|
||
|
||
<div class="mt-2 mb-2 p-3" style="border: 1px solid lightgray;">
|
||
<input type="text" placeholder="Наименование" data-pole="title" data-id="{$smarty.get.id}" class="form-control save-title" value="{$catInfo[0].title}">
|
||
<input type="text" placeholder="keywords" data-pole="keywords" data-id="{$smarty.get.id}" class="form-control mt-2 save-meta" value="{$catInfo[0].keywords}">
|
||
<input type="text" placeholder="description" data-pole="description" data-id="{$smarty.get.id}" class="form-control mt-2 save-meta" value="{$catInfo[0].description}">
|
||
<input type="hidden" id="id" value="{$smarty.get.id}">
|
||
|
||
<select class="form-control mt-2 mb-2" name="category" id="category" data-id="{$smarty.get.id}">
|
||
<option value="0">Нет</option>
|
||
{section name=customer loop=$catList} {if $catList[customer].id}
|
||
<option value="{$catList[customer].id}" {if ($catInfo[0].category==$catList[customer].id)} selected{/if}>{$catList[customer].title}</option>
|
||
{/if} {/section}
|
||
</select>
|
||
|
||
<div class="form-check" style="padding-top: 5px; margin-left: 17px;">
|
||
<input type="checkbox" class="form-check-input" id="status" name="status" {if $catInfo[0].status==1}checked{/if}>
|
||
<label class="form-check-label" for="public">Публиковать</label>
|
||
</div>
|
||
</div>
|
||
{if (!$smarty.get.id)}
|
||
|
||
<div id="drop-area" class="hidden"></div>
|
||
|
||
{/if}
|
||
|
||
|
||
|
||
</div>
|
||
|
||
|
||
|
||
<div class="tab-pane" id="tab-8-3">
|
||
|
||
{* Загрузка изображений категории *}
|
||
|
||
{include file=$uploadimg}
|
||
|
||
</div>
|
||
{/if}
|
||
|
||
|
||
<div class="tab-pane" id="tab-8-4">
|
||
<h2>Автофильтр</h2>
|
||
<p>Категория автоматически собирает товары соответствующие отбору:</p>
|
||
<div method="post" class="input-group mb-2" role="group" aria-label="Basic example">
|
||
<input type="text" name="txt" class="form-control" id="txt-add-filter">
|
||
<button type="button" class="btn btn-primary" id="btn-add-filter" data-id="{$smarty.get.id}">Добавить</button>
|
||
</div>
|
||
<table class="table" id="table-filter">
|
||
|
||
{section name=customer loop=$autofilter} {if $autofilter[customer].id}
|
||
|
||
|
||
<tr><td>{$autofilter[customer].txt}</td><td>Удалить</td></tr>
|
||
|
||
|
||
|
||
{/if} {/section}
|
||
|
||
</table>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- Модалка удаления -->
|
||
{include file=$modal_del_page}
|
||
{include file=$modal_new_cat}
|
||
<!-- Футер -->
|
||
{include file=$footer_admin} |