core/api/modules/a_tovar_cat/index.html

154 lines
7.5 KiB
HTML
Raw Normal View History

2022-12-11 13:55:49 +05:00
{include file=$header_admin h1="Все товары" title="Все товары"}
<input type="hidden" id="parent_id" value="{$smarty.get.id}"> {* вышестоящая категория, если она есть *}
<input type="hidden" id="del_id" value="">{* Ид удаляемого контента *}
2022-12-24 21:12:23 +05:00
{if ($catInfo)}
2022-12-11 13:55:49 +05:00
<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>
2022-12-24 21:12:23 +05:00
<li class="breadcrumb-item active" aria-current="page">{$catInfo[0].title}</li>
2022-12-11 13:55:49 +05:00
</ol>
</nav>
2022-12-24 21:12:23 +05:00
<h1>{$catInfo[0].title}</h1>
2022-12-11 13:55:49 +05:00
{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}
2022-12-24 21:12:23 +05:00
<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>
2023-01-07 18:55:55 +05:00
{if ($smarty.get.id)}
2022-12-24 21:12:23 +05:00
<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>
2023-07-12 20:02:20 +05:00
<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>
2023-01-07 18:55:55 +05:00
{/if}
2022-12-24 21:12:23 +05:00
</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>
2022-12-24 21:12:23 +05:00
<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>
2023-07-12 20:02:20 +05:00
<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>
2022-12-24 21:12:23 +05:00
<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>
2022-12-11 13:55:49 +05:00
2022-12-24 21:12:23 +05:00
</div>
2023-01-07 18:55:55 +05:00
{if ($smarty.get.id)}
2022-12-24 21:12:23 +05:00
<div class="tab-pane" id="tab-8-2">
<div class="mt-2 mb-2 p-3" style="border: 1px solid lightgray;">
2023-01-02 21:33:36 +05:00
<input type="text" placeholder="Наименование" data-pole="title" data-id="{$smarty.get.id}" class="form-control save-title" value="{$catInfo[0].title}">
2023-01-07 18:55:55 +05:00
<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}">
2022-12-24 21:12:23 +05:00
<input type="hidden" id="id" value="{$smarty.get.id}">
2023-07-12 20:02:20 +05:00
<select class="form-control mt-2 mb-2" name="category" id="category" data-id="{$smarty.get.id}">
2022-12-24 21:12:23 +05:00
<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>
2023-04-09 19:52:26 +05:00
{if (!$smarty.get.id)}
2022-12-11 13:55:49 +05:00
2023-04-09 19:52:26 +05:00
<div id="drop-area" class="hidden"></div>
{/if}
2022-12-11 13:55:49 +05:00
2022-12-24 21:12:23 +05:00
</div>
<div class="tab-pane" id="tab-8-3">
2023-01-07 18:55:55 +05:00
{* Загрузка изображений категории *}
2022-12-24 21:12:23 +05:00
2023-01-07 18:55:55 +05:00
{include file=$uploadimg}
2022-12-24 21:12:23 +05:00
</div>
2023-01-07 18:55:55 +05:00
{/if}
2023-07-12 20:02:20 +05:00
<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>
2022-12-24 21:12:23 +05:00
</div>
</div>
</div>
2022-12-11 13:55:49 +05:00
<!-- Модалка удаления -->
{include file=$modal_del_page}
{include file=$modal_new_cat}
2022-12-11 13:55:49 +05:00
<!-- Футер -->
{include file=$footer_admin}