core/api/modules/page_all/index.html

145 lines
7.6 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{include file=$header_admin h1="Все страницы" title="Все страницы"}
<input type="hidden" id="parent_id" value="{$smarty.get.id}"> {* вышестоящая категория, если она есть *}
<input type="hidden" id="del_id" value="">{* Ид удаляемого контента *} {if ($categoryInfo[0].title)}
<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>
<li class="breadcrumb-item active" aria-current="page">{$categoryInfo[0].title}</li>
</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">
<input type="text" placeholder="Наименование" id="categoryTitle" class="form-control">
<select class="form-control mt-2 mb-2" name="parentCategory" id="parentCategory">
<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">
<button id="createNewCategory" class="btn btn-primary">Сохранить</button>
<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">
<!-- Категории -->
{include file=$cat_list massiv=$categoryList}
<!-- Страницы -->
{include file=$pages_list massiv=$pagesList}
</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;">
<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}">
<select class="form-control mt-2 mb-2" name="category" id="category">
<option value="0">Нет</option>
{section name=customer loop=$all_cats} {if $all_cats[customer].id}
<option value="{$all_cats[customer].id}" {if ($categoryInfo[0].category==$all_cats[customer].id)} selected{/if}>{$all_cats[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 $categoryInfo[0].status==1}checked{/if}>
<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}