8 isset(
$user) or require
$_SERVER[
'DOCUMENT_ROOT'] .
'/page/404.php';
12 <div
class=
"table-responsive p-2">
13 <table
id=
"table-groups" class=
"table table-hover table-striped table-bordered table-sm text-nowrap small" style=
"width:100%">
14 <thead
class=
"bg-info text-center">
17 <th style=
"min-width:130px;">Название</th>
18 <th>Группа владелец</th>
19 <th>Системный вес</th>
20 <th>Лимит моделей</th>
21 <th>Моделей / Активно</th>
22 <th>Доступно моделей</th>
23 <th>Каталог по умолчанию</th>
24 <th>Пользователей</th>
25 <th style=
"max-width:200px;">Комментарий</th>
27 <th data-name=
"Вкл / выкл" style=
"width:60px;"><i
class=
"fa fa-power-off"></i></th>
28 <th data-name=
"Очистить" style=
"width:25px;"><i
class=
"fa fa-eraser"></i></th>
29 <th data-name=
"Удалить" style=
"width:25px;"><i
class=
"fa fa-trash"></i></th>
37 window.dataTablesConfigs[0].ajax =
'<?= Wrong\Models\Selects::find(6)->request ?>';
38 window.dataTablesConfigs[0].columnDefs = [{
42 window.dataTablesConfigs[0].initComplete =
function() {
43 $(
'#table-groups_length label').append(
'<button class="btn btn-outline-primary btn-sm" data-toggle="modal" data-target="#add-group" style="font-size:12px;margin-left:7px;"><i class="fa fa-plus-circle"></i> Добавить</button><button class="btn btn-outline-primary btn-sm" data-toggle="modal" data-target="#hide-table-cols" title="Видимость колонок таблицы <b>' + $(
'title').text() +
'</b>" style="font-size:12px;margin-left:5px;"><i class="fa fa-table"></i></button><button class="btn btn-outline-primary btn-sm" data-toggle="modal" data-target="#view-page" data-uri="//wrong-mvc.com/docs/models.html#groups" title="Документация" style="font-size:12px;margin-left:5px;"><i class="fa fa-question-circle"></i></button>');
45 $(
'#table-groups_filter label').append(
'<button title="Фильтр" data-target="#filter" data-table="groups" data-toggle="modal" class="btn btn-outline-primary btn-sm text-nowrap" style="font-size:12px;margin-left:5px;"><i class="fa fa-filter"></i></button><button id="reset-filter" data-action="filter" data-reset="true" data-table="groups" data-callback="afterResetFilter" title="Сбросить фильтр" class="btn btn-warning btn-sm text-nowrap" style="font-size:12px;margin-left:5px;display:<?= isset($_SESSION['filter
']['groups
']) ? 'inline-block
' : 'none
' ?>;"><i class="fa fa-close"></i></button>');
47 $(
'#table-groups').DataTable(window.dataTablesConfigs[0]);
50 function toggledLogs(response) {
52 errorToast(response.error);
55 $(
'#tgl-log-' + response.id).prop({
56 'checked': response.act
58 $(
'.toast').toast(
'hide');
60 dangerToast(response.message);
62 successToast(response.message);
65 $(
'.dataTable').DataTable().ajax.reload(
null,
false);
setcookie('FROM_UID', $uid, [ 'expires'=> time()+31536000, 'path'=> '/', 'domain'=> $_SERVER['HTTP_HOST'], 'secure'=> Wrong\Start\Env::$e->IS_SECURE, 'httponly'=> false, 'samesite'=> Wrong\Start\Env::$e->IS_SECURE ? 'None' :'Lax']) or setcookie('FROM_UID' $_SERVER['HTTP_HOST']