<?php
/* Smarty version 4.5.3, created on 2024-10-26 08:55:21
  from '/home/w/wmaster77/corp.site-77.ru/public_html/admin/design/html/components/files.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.5.3',
  'unifunc' => 'content_671c84493f4156_27901446',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'b83327575a7a88eb86401a414800010b6cba3777' => 
    array (
      0 => '/home/w/wmaster77/corp.site-77.ru/public_html/admin/design/html/components/files.tpl',
      1 => 1729807509,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_671c84493f4156_27901446 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_checkPlugins(array(0=>array('file'=>'/home/w/wmaster77/corp.site-77.ru/public_html/modules/smarty/plugins/modifier.count.php','function'=>'smarty_modifier_count',),));
?>
<div class="nk-block">
    <div class="nk-block-head">
        <h5 class="title mb-3">Файлы</h5>
        <p>Новые файлы появятся после сохранения</p>
    </div>
    <div class="row g-3 align-center">
        <div class="col-lg-12">
            <div class="form-group">
                <label class="custom-file-label" for="ajax_upload_file">Выбрать файл</label>
                <input type="file" class="custom-file-input" id="ajax_upload_file" accept="image/*,video/*,audio/*,.docx,.doc,.xlsx,.xls,.pdf,.zip,.rar">
                <progress class="w-100" min="0" max="100" value="0"></progress>
            </div>
        </div>
        <div class="col-lg-9">
            <label id="ajax_upload_file_status"></label>
        </div>
    </div>

    <?php if (smarty_modifier_count($_smarty_tpl->tpl_vars['files']->value) > 0) {?>
    <div class="table-mob-scroll card-variants">
        <div class="card-inner card-bordered p-0 mb-2">

            <table class="table table-striped sortable-table">
                <thead>
                    <tr>
                        <th class="py-2" scope="col">Тип</th>
                        <th class="py-2" scope="col">Ссылка</th>
                        <th class="py-2" scope="col">Описание</th>
                        <th class="py-2" scope="col">Добавлен</th>
                        <th class="py-2" scope="col">Размер</th>
                        <th class="py-2" scope="col">Удалить</th>
                    </tr>
                </thead>
                <tbody>
                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['files']->value, 'file');
$_smarty_tpl->tpl_vars['file']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['file']->value) {
$_smarty_tpl->tpl_vars['file']->do_else = false;
?>
                        <tr class="js-file-item">
                            <td width=10<?php echo '%>'; ?>

                                <span><b><?php echo strtoupper($_smarty_tpl->tpl_vars['file']->value->filetype);?>
</b></span>
                            </td>
                            <td width=10% valign=middle>
                                <a href="<?php echo $_smarty_tpl->tpl_vars['config']->value->root_url;?>
/<?php echo $_smarty_tpl->tpl_vars['file']->value->filepath;?>
" class="btn btn-trigger btn-icon js-clipboard-copy" data-toggle="tooltip" data-placement="top" title="Копировать">
                                    <em class="icon ti ti-copy"></em>
                                </a>
                            </td>
                            <td width=45<?php echo '%>'; ?>

                                <input type="hidden" name="files[id][]" value="<?php echo $_smarty_tpl->tpl_vars['file']->value->id;?>
">
                                <input type="text" class="form-control" name="files[name][]" placeholder="Название" value="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value->name, ENT_QUOTES, 'UTF-8', true);?>
">
                            </td>
                            <td width=15<?php echo '%>'; ?>

                                <span><?php echo call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'date' ][ 0 ], array( $_smarty_tpl->tpl_vars['file']->value->added,"d F Y" ));?>
</span>
                            </td>
                            <td width=10<?php echo '%>'; ?>

                                <span><?php echo call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'size' ][ 0 ], array( $_smarty_tpl->tpl_vars['file']->value->filesize ));?>
</span>
                            </td>
                            <td width=10<?php echo '%>'; ?>

                                <button type="button" class="btn btn-trigger btn-icon text-danger js-delete-file" data-toggle="tooltip" data-placement="top" title="" data-original-title="Удалить">
                                    <em class="icon ti ti-trash"></em>
                                </button>
                            </td>
                        </tr>
                    <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                </tbody>
            </table>

        </div>
    </div>
    <?php }?>
    <div class="text-center">
        <div class="form-group mt-2">
            <button type="submit" class="btn btn-success">Сохранить</button>
        </div>
    </div>
</div>
<?php }
}
