<?php
/* Smarty version 4.5.3, created on 2024-10-07 22:05:15
  from '/home/w/wmaster77/corp.site-77.ru/public_html/admin/design/html/blog.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.5.3',
  'unifunc' => 'content_670430eb8d31f7_52700349',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '967f19d7fe00d20ef8a89fe2417614e22a9a658b' => 
    array (
      0 => '/home/w/wmaster77/corp.site-77.ru/public_html/admin/design/html/blog.tpl',
      1 => 1716650267,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:pagination.tpl' => 1,
  ),
),false)) {
function content_670430eb8d31f7_52700349 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_assignInScope('meta_title', 'Блог' ,false ,8);?>

<div class="container-fluid">

        <div class="nk-block-head nk-block-head-sm">
        <div class="nk-block-between">
            <div class="nk-block-head-content">
                <h3 class="nk-block-title page-title">Блог</h3>
                <div class="nk-block-des text-soft">
                    <p>Управление блогом сайта.</p>
                </div>
            </div>
            <div class="nk-block-head-content">
                <div class="toggle-wrap nk-block-tools-toggle">

                                        <a href="#" class="btn btn-icon btn-trigger toggle-expand mr-n1" data-target="pageMenu">
                        <em class="icon ti ti-menu"></em>
                    </a>

                                        <div class="toggle-expand-content" data-content="pageMenu">
                        <ul class="nk-block-tools g-3">
                            <li>
                                <a href="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['url'][0], array( array('module'=>'PostAdmin','return'=>$_SERVER['REQUEST_URI']),$_smarty_tpl ) );?>
" class="btn btn-secondary">
                                    <em class="icon ti ti-circle-plus"></em>
                                    <span>Создать запись</span>
                                </a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>

        <div class="nk-block">
        <div class="card card-bordered card-stretch">
            <div class="card-inner-group">

                                <div class="card-inner">
                    <div class="card-title-group">

                                                <div class="card-title">
                            <h5 class="title">
                                <?php if (!empty($_smarty_tpl->tpl_vars['keyword']->value) && $_smarty_tpl->tpl_vars['posts_count']->value) {?>
                                    По вашему запросу <span class="text-soft"><?php echo $_smarty_tpl->tpl_vars['keyword']->value;?>
</span> найдено <?php echo call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'plural' ][ 0 ], array( $_smarty_tpl->tpl_vars['posts_count']->value,'запись','записей','записи' ));?>

                                <?php } elseif ($_smarty_tpl->tpl_vars['posts_count']->value) {?>
                                    Всего <?php echo call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'plural' ][ 0 ], array( $_smarty_tpl->tpl_vars['posts_count']->value,'запись','записей','записи' ));?>

                                <?php } else { ?>
                                    Нет записей
                                <?php }?>
                            </h5>
                        </div>

                                                <div class="card-tools mr-n1">
                            <ul class="btn-toolbar gx-1">

                                                                <?php if ($_smarty_tpl->tpl_vars['posts']->value || $_smarty_tpl->tpl_vars['keyword']->value) {?>
                                <li>
                                    <a href="#" class="search-toggle toggle-search btn btn-icon" data-target="search">
                                        <em class="icon ti ti-search"></em>
                                    </a>
                                </li>
                                <?php if (!empty($_smarty_tpl->tpl_vars['keyword']->value)) {?>
                                <li>
                                    <a href="#" class="btn btn-icon js-list-search-reset" data-toggle="tooltip" data-placement="top" data-original-title="Сбросить поиск">
                                        <em class="icon ti ti-x"></em>
                                    </a>
                                </li>
                                <?php }?>
                                <?php }?>

                            </ul>
                        </div>

                                                <?php if ($_smarty_tpl->tpl_vars['posts']->value || $_smarty_tpl->tpl_vars['keyword']->value) {?>
                        <div class="card-search search-wrap" data-search="search">
                            <div class="search-content">
                                <a href="#" class="search-back btn btn-icon toggle-search" data-target="search">
                                    <em class="icon ti ti-arrow-left"></em>
                                </a>
                                <form class="js-list-search" method="get">
                                    <input type="hidden" name="module" value="BlogAdmin">
                                    <input type="text" name="keyword" value="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['keyword']->value, ENT_QUOTES, 'UTF-8', true);?>
" class="form-control border-transparent form-focus-none" placeholder="Поиск по заголовку или тексту..">
                                    <button class="search-submit btn btn-icon"><em class="icon ti ti-search"></em></button>
                                </form>
                            </div>
                        </div>
                        <?php }?>

                    </div>
                </div>

                                <?php if ($_smarty_tpl->tpl_vars['posts']->value) {?>
                <form class="js-list-form" method="post">
                    <div class="card-inner p-0">

                                                <div class="nk-tb-list nk-tb-ulist">
                            <div class="nk-tb-item nk-tb-head">
                                <div class="d-table w-100 table-fixed">
                                    <div class="nk-tb-col nk-tb-col-check">
                                        <div class="custom-control custom-control-sm custom-checkbox notext">
                                            <input type="checkbox" class="custom-control-input js-check-all" id="checkall">
                                            <label class="custom-control-label" for="checkall"></label>
                                        </div>
                                    </div>
                                    <div class="nk-tb-col">
                                        <span class="sub-text">Имя</span>
                                    </div>
                                    <div class="nk-tb-col tb-col-md w-150px">
                                        <span class="sub-text">Дата публикации</span>
                                    </div>
                                    <div class="nk-tb-col tb-col-xl">
                                        <span class="sub-text">URL</span>
                                    </div>
                                    <div class="nk-tb-col nk-tb-col-tools text-right">Действие</div>
                                </div>
                            </div>
                        </div>

                                                <div class="nk-tb-list nk-tb-ulist nk-tb-slist is-compact js-list">

                                                        <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['posts']->value, 'post');
$_smarty_tpl->tpl_vars['post']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['post']->value) {
$_smarty_tpl->tpl_vars['post']->do_else = false;
?>
                            <div class="nk-tb-item js-list-item <?php if (!$_smarty_tpl->tpl_vars['post']->value->visible) {?>invisible<?php }?>">
                                <div class="d-table w-100 table-fixed">

                                                                        <div class="nk-tb-col nk-tb-col-check">
                                        <div class="custom-control custom-control-sm custom-checkbox notext">
                                            <input type="checkbox" name="check[]" value="<?php echo $_smarty_tpl->tpl_vars['post']->value->id;?>
" class="custom-control-input" id="uid_<?php echo $_smarty_tpl->tpl_vars['post']->value->id;?>
">
                                            <label class="custom-control-label" for="uid_<?php echo $_smarty_tpl->tpl_vars['post']->value->id;?>
"></label>
                                        </div>
                                    </div>

                                                                        <div class="nk-tb-col">
                                        <div class="user-card">
                                            <div class="user-avatar border bg-white rounded-pill rounded-0">
                                                <a href="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['url'][0], array( array('module'=>'PostAdmin','id'=>$_smarty_tpl->tpl_vars['post']->value->id,'return'=>$_SERVER['REQUEST_URI']),$_smarty_tpl ) );?>
">
                                                    <img src="<?php echo call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'resize' ][ 0 ], array( $_smarty_tpl->tpl_vars['post']->value->image,70,70,'crop','blob' ));?>
" class="rounded-0 p-1">
                                                </a>
                                            </div>
                                            <div class="user-info">
                                                <span class="tb-lead">
                                                    <a href="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['url'][0], array( array('module'=>'PostAdmin','id'=>$_smarty_tpl->tpl_vars['post']->value->id,'return'=>$_SERVER['REQUEST_URI']),$_smarty_tpl ) );?>
" class="text-secondary"><?php echo $_smarty_tpl->tpl_vars['post']->value->name;?>
</a>
                                                </span>
                                            </div>
                                        </div>
                                    </div>

                                                                        <div class="nk-tb-col tb-col-md w-150px">
                                        <div class="timeline">
                                            <div class="time"><?php echo call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'date' ][ 0 ], array( $_smarty_tpl->tpl_vars['post']->value->date ));?>
</div>
                                        </div>
                                    </div>

                                                                        <div class="nk-tb-col tb-col-xl">
                                        <span class="tb-sub">
                                            <span>/blog/<?php echo $_smarty_tpl->tpl_vars['post']->value->url;?>
</span>
                                        </span>
                                    </div>

                                                                        <div class="nk-tb-col nk-tb-col-tools">
                                        <ul class="nk-tb-actions gx-1">

                                                                                        <li>
                                                <a href="/blog/<?php echo $_smarty_tpl->tpl_vars['post']->value->url;?>
" target="_blank" class="btn btn-trigger btn-icon" data-toggle="tooltip" data-placement="top" data-original-title="Открыть на сайте">
                                                    <em class="icon ti ti-external-link"></em>
                                                </a>
                                            </li>

                                                                                        <li>
                                                <button type="button" class="btn btn-trigger btn-icon js-list-mark" data-mark-object="blog" data-mark-type="visible" data-mark-toogle-class="invisible" data-toggle="tooltip" data-placement="top" data-original-title="Активность">
                                                    <em class="icon ti ti-eye"></em>
                                                </button>
                                            </li>

                                                                                        <li>
                                                <button type="button" class="btn btn-trigger btn-icon text-danger js-list-delete" data-toggle="tooltip" data-placement="top" title="Удалить">
                                                    <em class="icon ti ti-trash"></em>
                                                </button>
                                            </li>

                                        </ul>
                                    </div>
                                </div>
                            </div>
                            <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>

                        </div>
                    </div>

                                        <div class="card-inner">
                        <div class="nk-block-between-md g-3">

                                                        <div class="g">
                                <div class="center form-inline flex-nowrap gx-3">
                                    <div class="form-wrap w-200px">
                                        <select name="action" class="form-select form-select-sm" data-placeholder="Массовые действия">
                                            <option value="">Массовые действия</option>
                                            <option value="enable">Сделать активным</option>
                                            <option value="disable">Сделать неактивным</option>
                                            <option value="delete">Удалить</option>
                                        </select>
                                    </div>
                                    <div class="btn-wrap">
                                        <span class="d-none d-md-block">
                                            <button type="submit" class="btn btn-dim btn-outline-light">Применить</button>
                                        </span>
                                        <span class="d-md-none">
                                            <button type="submit" class="btn btn-dim btn-outline-light btn-icon">
                                                <em class="icon ti ti-arrow-right"></em>
                                            </button>
                                        </span>
                                    </div>
                                </div>
                            </div>

                                                        <div class="g">
                                <?php $_smarty_tpl->_subTemplateRender('file:pagination.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('module'=>'BlogAdmin'), 0, false);
?>
                            </div>

                        </div>
                    </div>
                </form>
                <?php } else { ?>
                <div class="card-inner">
                    <div class="nk-tb-item">
                        <p>Новости не найдены</p>
                    </div>
                </div>
                <?php }?>
            </div>
        </div>
    </div>

</div>
<?php }
}
