core/api/modules/magaz_cat_admin/index.html

111 lines
6.7 KiB
HTML
Raw Normal View History

2022-12-11 13:55:49 +05:00
{include file=$header_admin h1="Категории магазинов" title="Категории магазинов"}
<section class="container">
<div class="alert alert-primary" role="alert">
Публичная часть модуля - /mc/id
</div>
<button type="button" class="btn btn-secondary modal_show" data-modal="#new_category"><i class="fas fa-plus mr-2"></i> Создать категорию</button>
<button type="button" class="btn btn-secondary modal_show" data-modal="#new_magazin"><i class="fas fa-plus mr-2"></i> Создать Магазин</button>
<button type="button" class="btn btn-secondary" data-link="/magaz_list_admin/"><i class="fas fa-list mr-2"></i></i> Магазины</button> {section name=customer loop=$list} {if $list[customer].id}
<div class="card mb-3" style="max-width: 100%;" id="{$list[customer].id}">
<div class="row g-0">
<div class="col-md-3">
<a href="/mc/{$list[customer].id}" target="_blank">
<img src="/api/img/gray/gif/gray.gif" data-original="/img/tc/mc/q_{$list[customer].img}.jpg" alt="..." style="width: 100%;" class="lazy">
</a>
</div>
<div class="col-md-9">
<div class="card-body">
<h5 class="card-title fast-edit-link" data-id="{$list[customer].id}" title="Жми дважды и я изменюсь">{$list[customer].txt}</h5>
<input type="text" title="Еще два раза и я сохранюсь!" class="form-control fast-edit hidden" data-type="string" data-name="txt" data-id="{$list[customer].id}" value='{$list[customer].txt}'>
<!-- p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p -->
<button type="button" class="btn btn-secondary" data-link="/magaz_cat_edit/{$list[customer].id}"><i class="fas fa-edit mr-2"></i>Изменить</button>
<button type="button" class="btn btn-danger del" data-id="{$list[customer].id}"><i class="fas fa-trash mr-2"></i>Удалить</button>
</div>
</div>
</div>
</div>
{/if} {/section}
</section>
<!-- General section box modal start -->
<div class="modal" id="new_category" tabindex="-1" role="dialog" aria-labelledby="ultraModal-Label" aria-hidden="true">
<div class="modal-dialog animated bounceInDown">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Добавить категорию</h4>
<button type="button" class="close" style="float: right;" data-dismiss="modal" aria-hidden="true">&times;</button>
</div>
<div class="modal-body">
<form action="/magaz_cat_admin/" method="post" enctype='multipart/form-data' id="new_category_form">
<input type="hidden" name="act" value="mc">
<div class="mb-3">
<label class="form-label">Обложка категории</label>
<input type="file" class="form-control" name="file">
</div>
<div class="alert alert-secondary" role="alert">
Подготовьте изображение размером 2000 х 1333 JPG и загрузите
</div>
<div class="mb-3">
<label class="form-label">Название категории</label>
<input type="text" class="form-control" name="txt">
</div>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-success form-submit" type="button" data-id="#new_category_form">Добавить</button>
<button data-dismiss="modal" class="btn btn-default" type="button">Закрыть</button>
</div>
</div>
</div>
</div>
<!-- modal end -->
<!-- General section box modal start -->
<div class="modal" id="new_magazin" tabindex="-1" role="dialog" aria-labelledby="ultraModal-Label" aria-hidden="true">
<div class="modal-dialog animated bounceInDown">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Добавить категорию</h4>
<button type="button" class="close" style="float: right;" data-dismiss="modal" aria-hidden="true">&times;</button>
</div>
<div class="modal-body">
<form action="/magaz_list_admin/" method="post" enctype='multipart/form-data' id="new_magazin_form">
<input type="hidden" name="act" value="nm">
<div class="mb-3">
<label class="form-label">Логотип магазина</label>
<input type="file" class="form-control" name="logo">
</div>
<div class="mb-3">
<label class="form-label">Фото магазина</label>
<input type="file" class="form-control" name="file">
</div>
<div class="alert alert-secondary" role="alert">
Подготовьте изображение размером 2000 х 1333 JPG и загрузите
</div>
<div class="mb-3">
<label class="form-label">Название магазина</label>
<input type="text" class="form-control" name="txt">
</div>
<div class="mb-3">
<label class="form-label">Категория</label>
<input type="text" class="form-control" name="parent">
</div>
<div class="mb-3">
<label class="form-label">Описание</label>
<textarea name="opis" class="form-control"></textarea>
</div>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-success form-submit" type="button" data-id="#new_magazin_form">Добавить</button>
<button data-dismiss="modal" class="btn btn-default" type="button">Закрыть</button>
</div>
</div>
</div>
</div>
<!-- modal end -->
{include file=$footer_admin}