<?php
/* Smarty version 4.5.2, created on 2024-08-14 11:37:07
  from '/home/life/public_html/teg.lifestyle.uz/admin/templates/views/contents/articles.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.5.2',
  'unifunc' => 'content_66bc96e33ad709_17089411',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'a954892718fc5ba2ef097c5c29770ea26b19e7ce' => 
    array (
      0 => '/home/life/public_html/teg.lifestyle.uz/admin/templates/views/contents/articles.tpl',
      1 => 1711623621,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:module/show-by.tpl' => 1,
    'file:components/page-header.tpl' => 1,
    'file:components/selectors.tpl' => 1,
    'file:module/pagination.tpl' => 1,
  ),
),false)) {
function content_66bc96e33ad709_17089411 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_checkPlugins(array(0=>array('file'=>'/home/life/public_html/teg.lifestyle.uz/includes/composer/vendor/smarty/smarty/libs/plugins/modifier.date_format.php','function'=>'smarty_modifier_date_format',),1=>array('file'=>'/home/life/public_html/teg.lifestyle.uz/includes/composer/vendor/smarty/smarty/libs/plugins/modifier.truncate.php','function'=>'smarty_modifier_truncate',),));
?>

<!-- Page header -->
<?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "buttons", null, null);?>
    <?php if (!empty($_smarty_tpl->tpl_vars['sections']->value)) {?>
		<a class="btn btn-sm btn-primary" data-bs-popup="tooltip" title="Добавить" data-bs-placement="auto" href="<?php echo htmlspecialchars((string)call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'substr' ][ 0 ], array( $_smarty_tpl->tpl_vars['generate_url']->value,0,-1 )), ENT_QUOTES, 'UTF-8', true);?>
?action=edit<?php if ((isset($_smarty_tpl->tpl_vars['page']->value))) {?>&page=<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['page']->value, ENT_QUOTES, 'UTF-8', true);
}
echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['buildQueryString']->value, ENT_QUOTES, 'UTF-8', true);?>
"><i class="icon-plus3"></i></a>
    <?php }
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>

<?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "breadcrumb", null, null);?>
	<a href="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['generate_url']->value, ENT_QUOTES, 'UTF-8', true);?>
" class="breadcrumb-item"><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['title']->value, ENT_QUOTES, 'UTF-8', true);?>
</a>
<?php $_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>

<?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "showBy", null, null);?>
    <?php $_smarty_tpl->_subTemplateRender("file:module/show-by.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('url'=>$_smarty_tpl->tpl_vars['generate_url']->value), 0, false);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>

<?php $_smarty_tpl->_subTemplateRender("file:components/page-header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('buttons'=>$_smarty_tpl->smarty->ext->_capture->getBuffer($_smarty_tpl, 'buttons'),'breadcrumb'=>$_smarty_tpl->smarty->ext->_capture->getBuffer($_smarty_tpl, 'breadcrumb'),'showBy'=>$_smarty_tpl->smarty->ext->_capture->getBuffer($_smarty_tpl, 'showBy')), 0, false);
?>
<!-- /page header -->

<!-- Content area -->
<div class="content">

	<div class="row">
		<div class="col-md-12">
            <?php if (empty($_smarty_tpl->tpl_vars['sections']->value)) {?>
				<div class="card border shadow-sm">
					<div class="alert bg-danger text-white alert-dismissible m-0">
						<span class="font-weight-semibold">Перед добавлением, добавьте хотя бы один <a href="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['adminUrl']->value, ENT_QUOTES, 'UTF-8', true);?>
/section?action=add&parentId=0" class="text-white">раздел</a>.</span>
					</div>
				</div>
            <?php }?>

			<div class="card border shadow-sm">
                <?php $_smarty_tpl->_subTemplateRender("file:components/selectors.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('filter'=>true,'url'=>$_smarty_tpl->tpl_vars['generate_url']->value,'filterDate'=>true), 0, false);
?>
			</div>

			<div class="card card_check_button collapse">
				<div class="card-header bg-light py-2 header-elements-sm-inline">
					<div class="header-elements">
						<ul class="list-inline list-inline-condensed mb-0">
							<button class="btn btn-sm btn-primary" type="button">Удалить выбранное</button>
						</ul>
					</div>
				</div>
			</div>

			<div class="card border shadow-sm">
				<div class="card-header d-flex justify-content-between">
                    <a href="<?php echo htmlspecialchars((string)call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'substr' ][ 0 ], array( $_smarty_tpl->tpl_vars['generate_url']->value,0,-1 )), ENT_QUOTES, 'UTF-8', true);?>
?action=edit<?php if ((isset($_smarty_tpl->tpl_vars['page']->value))) {?>&page=<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['page']->value, ENT_QUOTES, 'UTF-8', true);
}
echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['buildQueryString']->value, ENT_QUOTES, 'UTF-8', true);?>
" class="btn btn-sm btn-primary me-auto" title="Добавить"><i class="ph-plus me-2"></i>Добавить</a>
				</div>

				<div class="">
					<table class="table table-xs table-togglable table-striped table-hover" id="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['module']->value, ENT_QUOTES, 'UTF-8', true);?>
">
						<thead>
						<tr>
							<th class="text-center" width="30">
								<div class="form-check">
									<input type="checkbox" class="form-check-input content_check_all">
								</div>
							</th>
							<th class="text-center gridjs-th-sort main-th-col-sortable" onclick="tableSort(this, '<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['module']->value, ENT_QUOTES, 'UTF-8', true);?>
'); return false;" data-sort-by="publishedOn" data-sort-order="<?php if ((isset($_smarty_tpl->tpl_vars['sortOrder']->value['column'])) && $_smarty_tpl->tpl_vars['sortOrder']->value['column'] == 'publishedOn') {
if ($_smarty_tpl->tpl_vars['sortOrder']->value['sort'] == 'asc') {?>desc<?php } else { ?>asc<?php }
} else { ?>asc<?php }?>" width="100">Дата <button class="gridjs-sort gridjs-sort-<?php if ((isset($_smarty_tpl->tpl_vars['sortOrder']->value['column'])) && $_smarty_tpl->tpl_vars['sortOrder']->value['column'] == 'publishedOn') {
echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['sortOrder']->value['sort'], ENT_QUOTES, 'UTF-8', true);
} else { ?>neutral<?php }?>"></button></th>
							<th class="text-center" width="120">ФОТО</th>
							<th class="text-start gridjs-th-sort main-th-col-sortable" onclick="tableSort(this, '<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['module']->value, ENT_QUOTES, 'UTF-8', true);?>
'); return false;" data-sort-by="title" data-sort-order="<?php if ((isset($_smarty_tpl->tpl_vars['sortOrder']->value['column'])) && $_smarty_tpl->tpl_vars['sortOrder']->value['column'] == 'title') {
if ($_smarty_tpl->tpl_vars['sortOrder']->value['sort'] == 'asc') {?>desc<?php } else { ?>asc<?php }
} else { ?>asc<?php }?>">Заголовок <button class="gridjs-sort gridjs-sort-<?php if ((isset($_smarty_tpl->tpl_vars['sortOrder']->value['column'])) && $_smarty_tpl->tpl_vars['sortOrder']->value['column'] == 'title') {
echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['sortOrder']->value['sort'], ENT_QUOTES, 'UTF-8', true);
} else { ?>neutral<?php }?>"></button></th>
							<th class="text-center gridjs-th-sort main-th-col-sortable" onclick="tableSort(this, '<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['module']->value, ENT_QUOTES, 'UTF-8', true);?>
'); return false;" data-sort-by="sectionId" data-sort-order="<?php if ((isset($_smarty_tpl->tpl_vars['sortOrder']->value['column'])) && $_smarty_tpl->tpl_vars['sortOrder']->value['column'] == 'sectionId') {
if ($_smarty_tpl->tpl_vars['sortOrder']->value['sort'] == 'asc') {?>desc<?php } else { ?>asc<?php }
} else { ?>asc<?php }?>">Раздел <button class="gridjs-sort gridjs-sort-<?php if ((isset($_smarty_tpl->tpl_vars['sortOrder']->value['column'])) && $_smarty_tpl->tpl_vars['sortOrder']->value['column'] == 'sectionId') {
echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['sortOrder']->value['sort'], ENT_QUOTES, 'UTF-8', true);
} else { ?>neutral<?php }?>"></button></th>
                            <th class="text-center text-muted" width="30">
                                <div class="btn-group">
                                    <a href="javascript:void(0);" class="align-items-center text-body dropdown-toggle" data-bs-toggle="dropdown"><i class="ph-gear"></i></a>
                                    <div class="dropdown-menu" style="">
                                        <button class="dropdown-item" onclick="clearTableSort(this, '<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['module']->value, ENT_QUOTES, 'UTF-8', true);?>
'); return false;" type="button"><i class="ph-check me-2"></i>Сбросить сортировку</button>
                                    </div>
                                </div>
                            </th>
						</tr>
						</thead>
                        <?php if (!empty($_smarty_tpl->tpl_vars['articles']->value)) {?>
							<tbody>
                            <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['articles']->value, 'article', false, NULL, 'articles', array (
));
$_smarty_tpl->tpl_vars['article']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['article']->value) {
$_smarty_tpl->tpl_vars['article']->do_else = false;
?>
								<tr id="<?php echo htmlspecialchars((string)call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'substr' ][ 0 ], array( $_smarty_tpl->tpl_vars['module']->value,0,-1 )), ENT_QUOTES, 'UTF-8', true);?>
-<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['article']->value['articleId'], ENT_QUOTES, 'UTF-8', true);?>
" data-id="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['article']->value['articleId'], ENT_QUOTES, 'UTF-8', true);?>
" class="<?php if ($_smarty_tpl->tpl_vars['article']->value['status'] == 'H') {?>table-danger<?php }
if ($_smarty_tpl->tpl_vars['article']->value['status'] == 'P') {?>table-warning<?php }?>">
									<td class="text-center">
										<div class="form-check">
											<input type="checkbox" class="form-check-input content_list_check" value="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['article']->value['articleId'], ENT_QUOTES, 'UTF-8', true);?>
" data-id="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['article']->value['articleId'], ENT_QUOTES, 'UTF-8', true);?>
">
										</div>
									</td>
									<td class="text-left text-nowrap"><span><?php echo htmlspecialchars((string)smarty_modifier_date_format($_smarty_tpl->tpl_vars['article']->value['publishedOn'],$_smarty_tpl->tpl_vars['config']->value['date_format_custom']), ENT_QUOTES, 'UTF-8', true);?>
</span></td>
									<td class="text-center"><div class="preview preview-md"><img src="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['article']->value['image'], ENT_QUOTES, 'UTF-8', true);?>
" class="img-thumbnail w-80px" alt="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['article']->value['title'], ENT_QUOTES, 'UTF-8', true);?>
"/></div></td>
									<td class="text-start"><b data-bs-popup="tooltip" title="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['article']->value['title'], ENT_QUOTES, 'UTF-8', true);?>
" data-bs-placement="auto"><?php echo htmlspecialchars((string)smarty_modifier_truncate($_smarty_tpl->tpl_vars['article']->value['title'],75), ENT_QUOTES, 'UTF-8', true);?>
</b></td>
									<td class="text-center"><?php echo htmlspecialchars((string)smarty_modifier_truncate($_smarty_tpl->tpl_vars['article']->value['section'],25), ENT_QUOTES, 'UTF-8', true);?>
</td>
									<td class="text-center">
										<div class="d-inline-flex">
											<a class="text-primary" data-bs-popup="tooltip" title="Редактировать" data-bs-placement="auto" href="<?php echo htmlspecialchars((string)call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'substr' ][ 0 ], array( $_smarty_tpl->tpl_vars['generate_url']->value,0,-1 )), ENT_QUOTES, 'UTF-8', true);?>
?action=edit&id=<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['article']->value['articleId'], ENT_QUOTES, 'UTF-8', true);
if (!empty($_smarty_tpl->tpl_vars['page']->value)) {?>&page=<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['page']->value, ENT_QUOTES, 'UTF-8', true);
}
echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['buildQueryString']->value, ENT_QUOTES, 'UTF-8', true);?>
"><i class="ph-note-pencil me-2"></i></a>
											<div class="dropdown">
												<a class="text-body" data-bs-toggle="dropdown"><i class="ph-list"></i></a>
												<div class="dropdown-menu dropdown-menu-end">
                                                    <?php if ($_smarty_tpl->tpl_vars['article']->value['status'] == 'P') {?>
														<button class="dropdown-item text-danger" id="article-approve-<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['article']->value['articleId'], ENT_QUOTES, 'UTF-8', true);?>
" onclick="return approve(<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['article']->value['articleId'], ENT_QUOTES, 'UTF-8', true);?>
, '<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['module']->value, ENT_QUOTES, 'UTF-8', true);?>
');"><i class="icon-thumbs-up2 me-2"></i> Одобрить</button>
                                                    <?php }?>
													<a class="dropdown-item" href="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['article']->value['url'], ENT_QUOTES, 'UTF-8', true);?>
" target="_blank"><i class="ph-share me-2"></i> Посмотреть</a>
													<button class="dropdown-item"><i class="ph-star me-2 <?php if ($_smarty_tpl->tpl_vars['article']->value['isFeatured']) {?>text-warning<?php }?>"></i> Избранные</button>
													<a class="dropdown-item" href="<?php echo htmlspecialchars((string)call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'substr' ][ 0 ], array( $_smarty_tpl->tpl_vars['generate_url']->value,0,-1 )), ENT_QUOTES, 'UTF-8', true);?>
?action=edit&id=<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['article']->value['articleId'], ENT_QUOTES, 'UTF-8', true);
if (!empty($_smarty_tpl->tpl_vars['page']->value)) {?>&page=<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['page']->value, ENT_QUOTES, 'UTF-8', true);
}
echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['buildQueryString']->value, ENT_QUOTES, 'UTF-8', true);?>
"><i class="ph-note-pencil me-2"></i> Редактировать</a>
													<button class="dropdown-item ajax_action" data-module="articles" data-action="status" data-id="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['article']->value['articleId'], ENT_QUOTES, 'UTF-8', true);?>
"><i class="<?php if ($_smarty_tpl->tpl_vars['article']->value['status'] == 'V') {?>ph-eye<?php } else { ?>ph-eye-slash<?php }?> me-2"></i> Статус</button>
													<div class="dropdown-divider"></div>
													<button class="dropdown-item text-danger" onclick="newRemove(<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['article']->value['articleId'], ENT_QUOTES, 'UTF-8', true);?>
, '<?php echo htmlspecialchars((string)htmlspecialchars((string)$_smarty_tpl->tpl_vars['article']->value['title'], ENT_QUOTES, 'UTF-8', true), ENT_QUOTES, 'UTF-8', true);?>
', '<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['module']->value, ENT_QUOTES, 'UTF-8', true);?>
');"><i class="ph-trash me-2"></i> Удалить</button>
												</div>
											</div>
										</div>
									</td>
								</tr>
                            <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
							</tbody>
                        <?php } else { ?>
							<tbody><tr class="odd"><td class="text-center" colspan="8">- Не найдено -</td></tr></tbody>
                        <?php }?>
					</table>
				</div>
                <?php $_smarty_tpl->_subTemplateRender("file:module/pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('url'=>((string)$_smarty_tpl->tpl_vars['generate_url']->value),'params'=>((string)$_smarty_tpl->tpl_vars['buildQueryString']->value)), 0, false);
?>
			</div>
		</div>

	</div>
</div>

<?php echo '<script'; ?>
>




    function notFound() {
        new Noty({ text: 'контент не найден или пустой ID', layout: 'topRight', type: 'error', timeout: 1500 }).show();
    }
    function approveError() {
        new Noty({ text: 'ошибка при одобрение контента', layout: 'topRight', type: 'error', timeout: 2500 }).show();
    }

    function approveSuccess(id) {
        document.getElementById('status-' + id).innerHTML = 'Включено';
        document.getElementById('article-approve-' + id).style.display = 'none';
        document.getElementById('article-status-' + id).innerHTML = '<i class="icon-eye"></i> Включено';
        new Noty({ text: 'Контент одобрен без модерации', layout: 'topRight', type: 'success', timeout: 1500 }).show();
    }

    $(document).ready(function () {

        <?php if ((isset($_smarty_tpl->tpl_vars['messages']->value['saved']))) {?> new Noty({ text: 'Контент &laquo;<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['article']->value['title'], ENT_QUOTES, 'UTF-8', true);?>
&raquo; сохранен.', type: 'success', timeout: 1500 }).show(); <?php }?>

        <?php if ((isset($_smarty_tpl->tpl_vars['errors']->value['access_denied']))) {?> new Noty({ text: 'Доступ запрещен.', type: 'error', timeout: 2500 }).show(); <?php }?>
        <?php if ((isset($_smarty_tpl->tpl_vars['errors']->value['not_saved']))) {?>   new Noty({ text: 'Контент &laquo;<?php if ((isset($_smarty_tpl->tpl_vars['article']->value['title']))) {
echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['article']->value['title'], ENT_QUOTES, 'UTF-8', true);
}?>&raquo; НЕ сохранен.', type: 'error', timeout: 2500 }).show(); <?php }?>
        <?php if ((isset($_smarty_tpl->tpl_vars['errors']->value['no_sections']))) {?> new Noty({ text: 'Перед добавлением контент, добавьте хотя бы один раздел.', type: 'error', timeout: 2500 }).show(); <?php }?>
        <?php if ((isset($_smarty_tpl->tpl_vars['errors']->value['article_not_found']))) {?> new Noty({ text: 'Контент не найден или доступ запрещен.', type: 'error', timeout: 2500 }).show(); <?php }?>

        <?php if ((isset($_smarty_tpl->tpl_vars['notice']->value))) {?> new Noty({ text: <?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['notice']->value, ENT_QUOTES, 'UTF-8', true);?>
, type: 'error', timeout: 2500 }).show(); <?php }?>

    });


    // выбрать все
    $(document).on("change", ".content_check_all", function () {
        if ($(this).is(":checked")) {
            $('.content_list_check').each(function () {
                if (!$(this).is(":checked")) $(this).trigger("click");
            });
            $('.footer_navbar').removeClass('collapse').addClass('fixed-bottom')
        } else {
            $('.content_list_check').each(function () {
                if ($(this).is(":checked")) $(this).trigger("click");
            });
            $('.footer_navbar').addClass('collapse').removeClass('fixed-bottom')
        }
    });

    // выбрать один
    $(document).on("change", ".content_list_check", function () {
        if ( $('input.content_list_check:checked').length > 0 ) {
            $('.footer_navbar').removeClass('collapse').addClass('fixed-bottom')

        } else {
            $('.footer_navbar').addClass('collapse').removeClass('fixed-bottom')
            if ($('.content_check_all').is(":checked")) $('.content_check_all').trigger("click");
            // $('.content_check_all').trigger("click");
        }
    });

    $(document).on('click', '.content_save_button',  function () {
        var articleIds = [];
        $('.content_list_check').each(function () {
            if ($(this).is(":checked")) {
                articleIds.push($(this).attr("data-id"));
            }
        });

        var group_action_text =  $(".content_select_action :selected").text();
        var group_action =  $(".content_select_action").val();

        bootbox.confirm({
            closeButton: false,
            message: 'Вы действительно хотите "' + group_action_text + '"?' ,
            callback: function(result) {
                console.log(result);
                if (result === true) {
                    $.post('index.php?mod=<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['module']->value, ENT_QUOTES, 'UTF-8', true);?>
&action=group', { articleIds: articleIds, group_action: group_action }, function (data) {
                        console.log(data);
                        new Noty({ text: data.message, type: data.type }).show();
                        if (data.status === 200) {
                            setTimeout(function() {
                                window.location.reload();
                            }, 1500);

                        }
                    }, 'json');
                }
            }
        });
    });

    $(document).on('click', '.save_setting_table', function () {
        var projectIds = [];
        $('input.table_column:checked').each(function() {
            projectIds.push($(this).val());
        });

        console.log("projectIds => " + projectIds);

        const order_field = $('.order_field :selected').val();

        const order_direction = $('.order_direction :selected').val();
        console.log("order_field => " + order_field);
        console.log("order_direction => " + order_direction);

        $.post('index.php?mod=<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['module']->value, ENT_QUOTES, 'UTF-8', true);?>
&action=settings', { "option[columns]": projectIds, "option[order_field]": order_field, "option[order_direction]": order_direction }, function (response) {
            console.log(response);
            new Noty({ text: response.message, type: response.type }).show();
            if (response.status == 200) {
                $('.close_setting_table').click();
                setTimeout(function() {
                    window.location.reload();
                }, 1500);
            }

        }, 'json');

    });
<?php echo '</script'; ?>
>




<?php }
}
