core/api/modules/page_all/index.html

145 lines
7.6 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}"> {* вышестоящая категория, если она есть *}
2022-12-17 18:15:09 +05:00
<input type="hidden" id="del_id" value="">{* Ид удаляемого контента *} {if ($categoryInfo[0].title)}
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="/page_all/">Все страницы</a></li>
2022-12-17 18:15:09 +05:00
<li class="breadcrumb-item active" aria-current="page">{$categoryInfo[0].title}</li>
2022-12-11 13:55:49 +05:00
</ol>
</nav>
<h1>{$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="btn-group" role="group" aria-label="Basic example">
<button type="button" data-link="/page_edit/" class="btn btn-primary"><i class="far fa-file" style="margin-right: 7px;"></i>Создать страницу</button>
<button type="button" class="btn btn-primary" id="showDivNewCat"><i class="fas fa-plus" style="margin-right: 7px;"></i> Новая категория</button>
</div>
<div class="mt-2 mb-2 p-3 hidden" style="border: 1px solid lightgray;" id="divNewCat">
2022-12-17 18:15:09 +05:00
<input type="text" placeholder="Наименование" id="categoryTitle" class="form-control">
<select class="form-control mt-2 mb-2" name="parentCategory" id="parentCategory">
2022-12-11 13:55:49 +05:00
<option value="0">Нет</option>
{section name=customer loop=$all_cats} {if $all_cats[customer].id}
<option value="{$all_cats[customer].id}">{$all_cats[customer].title}</option>
{/if} {/section}
</select>
<div class="btn-group" role="group" aria-label="Basic example">
2022-12-17 18:15:09 +05:00
<button id="createNewCategory" class="btn btn-primary">Сохранить</button>
2022-12-11 13:55:49 +05:00
<button id="cancelNewSaveMeta" class="btn btn-primary">Отмена</button>
</div>
</div>
<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>
<li class="nav-item">
<a class="nav-link" href="#tab-8-2" data-toggle="tab"><i class="fa-sharp fa-solid fa-image"></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-gears"></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-chart-simple"></i> SEO-статистика</a>
</li>
</ul>
</div>
<div class="ibox-body">
<div class="tab-content">
<div class="tab-pane fade show active" id="tab-8-1">
<table class="table">
<!-- Категории -->
2022-12-17 18:15:09 +05:00
{include file=$cat_list massiv=$categoryList}
2022-12-11 13:55:49 +05:00
<!-- Страницы -->
2023-01-14 21:17:46 +05:00
{include file=$pages_list massiv=$pagesList}
2022-12-11 13:55:49 +05:00
</table>
</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 class="tab-pane" id="tab-8-3">
<div class="mt-2 mb-2 p-3" style="border: 1px solid lightgray;">
2022-12-17 18:15:09 +05:00
<input type="text" placeholder="Наименование" id="title" class="form-control" value="{$categoryInfo[0].title}">
<input type="text" placeholder="keywords" id="keywords" class="form-control mt-2" value="{$categoryInfo[0].keywords}">
<input type="text" placeholder="description" id="description" class="form-control mt-2" value="{$categoryInfo[0].description}">
<input type="hidden" id="id" value="{$smarty.get.id}">
2022-12-11 13:55:49 +05:00
2022-12-17 18:15:09 +05:00
<select class="form-control mt-2 mb-2" name="category" id="category">
2022-12-11 13:55:49 +05:00
<option value="0">Нет</option>
{section name=customer loop=$all_cats} {if $all_cats[customer].id}
2022-12-17 18:15:09 +05:00
<option value="{$all_cats[customer].id}" {if ($categoryInfo[0].category==$all_cats[customer].id)} selected{/if}>{$all_cats[customer].title}</option>
2022-12-11 13:55:49 +05:00
{/if} {/section}
</select>
<div class="form-check" style="padding-top: 5px; margin-left: 17px;">
2022-12-17 18:15:09 +05:00
<input type="checkbox" class="form-check-input" id="status" name="status" {if $categoryInfo[0].status==1}checked{/if}>
2022-12-11 13:55:49 +05:00
<label class="form-check-label" for="public">Публиковать</label>
</div>
<div class="btn-group mt-3" role="group" aria-label="Basic example">
<button id="saveMeta" class="btn btn-primary">Сохранить</button>
<button type="button" class="btn btn-primary">Удалить</button>
</div>
<div class="mt-2 p-3" id="div-log" style="border: 1px solid lightgray;" title="log"></div>
</div>
</div>
<div class="tab-pane" id="tab-8-4">
</div>
</div>
</div>
</div>
<!-- Модалка удаления -->
{include file=$modal_del_page}
<!-- Футер -->
{include file=$footer_admin}