virt2/api/mod/fm.html

95 lines
5.2 KiB
HTML
Raw Permalink Normal View History

{include file=$header_admin h1="Менеджер файлов" title="Менеджер файлов"}
<div class="input-group">
<button class="btn btn-dark btn-modal" data-modal="modal-upload" type="button" title="Загрузить"><i class="fa fa-cloud-upload-alt"></i></button>
<button class="btn btn-dark btn-modal" data-modal="modal-newfolder" type="button" title="Новая папка"><i class="fa fa-folder-plus"></i></button>
</div>
<span>Текущий каталог: {$cat2}</span>
<table class="table">
{* Определяем нужен ли выход в корень *}
{if ($smarty.const.ID)}
<tr><td style="width: 12px;"><a href="/fm/"><i class="far fa-folder"></i></a></td><td><a href="/fm/">В корень</a></td><td style="width: 20px;"></td></tr>
{/if}
{* список директорий *}
{section name=customer loop=$dirs}
<tr><td style="width: 12px;"><a href="/fm/{$smarty.const.ID}---{$dirs[customer]}"><i class="far fa-folder"></i></a> </td><td><a href="/fm/{$smarty.const.ID}---{$dirs[customer]}">{$dirs[customer]}</a></td><td style="width: 20px;"></td></tr>
{/section}
{* список файлов *}
{section name=customer loop=$files}
{if ($files[customer]!='.htaccess')}
<tr id="tr_{$cat2}/{$files[customer]}"><td style="width: 12px;"><a href="{$cat2}/{$files[customer]}"><i class="far fa-file-alt"></i></a></td><td><a href="{$cat2}/{$files[customer]}">{$files[customer]}</a></td><td style="width: 20px;">
<div class="btn-group">
<button class="btn btn-dark btn-copy-path" type="button" data-txt="{$cat2}/{$files[customer]}" title="Копировать путь"><i class="far fa-clipboard"></i></button>
<button class="btn btn-dark btn-modal del" type="button" data-modal="modal-del" data-txt="{$cat2}/{$files[customer]}" title="Удалить"><i class="fas fa-trash"></i></button>
</div>
</td></tr>
{/if}
{/section}
</table>
{* модальное окошко загрузки *}
<div class="modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" id="modal-upload">
<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 class="text-center"><i class="fa fa-file-download" id="i-upload" style="font-size:50pt;cursor:pointer;"></i></p>
<form id="form-upload" method="post" action="" enctype="multipart/form-data">
<input type="file" id="input-upload" name="file" class="hidden">
</form>
<p id="p-upload"></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="btn-upload">Загрузить</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Отменить</button>
</div>
</div>
</div>
</div>
{* модальное окошко новая папка *}
<div class="modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" id="modal-newfolder">
<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">
<form id="form-newfolder" method="post" action="" enctype="multipart/form-data">
<p class="text-center"><input type="text" id="input-newfolder" name="newcat" placeholder="Имя папки" class="form-control"></p>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="btn-newfolder">Создать</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Отменить</button>
</div>
</div>
</div>
</div>
{* модальное окошко удаления *}
<div class="modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" id="modal-del">
<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 class="text-center"><i class="fa fa-trash" style="font-size:30pt;"></i></p>
<input id="input-del" type="hidden">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="btn-del">Удалить</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Отменить</button>
</div>
</div>
</div>
</div>
{include file=$footer_admin}