core/api/modules/my_orders/index.html

119 lines
5.5 KiB
HTML
Raw 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 h1="Разделы" title="Разделы"}
<input type="hidden" id="tmp" value="">
<input type="hidden" id="tmp2" value=""> {if $smarty.get.id}
<h2>Изменить категорию:</h2>
<button type="button" data-link="/page_cat/" class="btn btn-dark" title="Новая страница" style="float:left;height: 35px;">
Создать раздел</button> {else}
<h2>Добавить категорию:</h2>
{/if}
<div class="clearfix"></div>
<form action="/page_cat/{$smarty.get.id}" method="post" enctype='multipart/form-data' class="mt-3">
<div class="mb-3">
<label class="form-label">Название раздела</label>
<input type="text" name="title" class="form-control" value="{$pages_cat[0].title}">
<!-- div id="emailHelp" class="form-text">We'll never share your email with anyone else.</div -->
</div>
<div class="mb-3">
<label class="form-label">Вышестоящий раздел</label>
<select class="form-control" name="parent">
<option value="0">Нет</option>
{section name=customer loop=$list} {if $list[customer].id}
<option value="{$list[customer].id}" {if ($pages_cat[0].parent==$list[customer].id)} selected{/if}>{$list[customer].title}</option>
{/if} {/section}
</select>
</div>
<div class="mb-3 form-check">
<input type="checkbox" class="form-check-input" name="public" {if ($pages_cat[0].public==1)} checked {/if}>
<label class="form-check-label" for="exampleCheck1">Публиковать</label>
</div>
<div class="mb-3">
<label class="form-label">Описание</label>
<input type="text" name="description" class="form-control" value="{$pages_cat[0].description}">
<!-- div id="emailHelp" class="form-text">We'll never share your email with anyone else.</div -->
</div>
<div class="mb-3">
<label class="form-label">Ключевые слова</label>
<input type="text" name="keywords" class="form-control" value="{$pages_cat[0].keywords}">
<!-- div id="emailHelp" class="form-text">We'll never share your email with anyone else.</div -->
</div>
{if $pages_cat[0].img}
<div class="mb-3" id="div-img">
<img src="/img/pages_cat/{$pages_cat[0].img}.jpg" style="width: 200px;">
<button type="button" class="btn btn-danger" id="btn-open-modal-del-img">Удалить</button>
</div>
{/if}
<div class="mb-3">
<label class="form-label">Обложка раздела</label>
<input type="file" name="img" class="form-control">
<div class="form-text">Старайтесь выбирать картинки одинакового размера</div>
</div>
<button type="submit" class="btn btn-primary">Сохранить</button>
</form>
<table class="table">
{section name=customer loop=$list} {if $list[customer].id}
<tr id="{$list[customer].id}">
<td>
<a href="/cat/{$list[customer].id}">{$list[customer].title}</a>
</td>
<td style="width:20px;">
<a href="/page_cat/{$list[customer].id}" class="edit_cat"><i class="far fa-edit"></i></a>
</td>
<td style="width:20px;">
<a href="{$list[customer].id}" class="del_cat" title="{$list[customer].title}" data-toggle="modal" data-target="#exampleModal"><i class="fas fa-trash"></i></a>
</td>
</tr>
{/if} {/section}
</table>
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Удалить категорию</h5>
<!-- button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button -->
</div>
<div class="modal-body">
<p id="modal_txt">Modal body text goes here.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-dark" id="del">Удалить</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Отмена</button>
</div>
</div>
</div>
</div>
{if $pages_cat[0].img}
<div class="modal fade" id="exampleModal2" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Удалить обложку</h5>
<!-- button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button -->
</div>
<div class="modal-body">
<img src="/img/pages_cat/{$pages_cat[0].img}.jpg" style="width: 100%;">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-dark" id="del_img" data-id="{$smarty.get.id}">Удалить</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Отмена</button>
</div>
</div>
</div>
</div>
{/if} {include file=$footer}