actions.php
См. документацию.
1 <?php
2 
3 /**
4  * @file
5  * @brief страница админки с моделями типа "действие"
6  */
7 
8 isset($user) or require $_SERVER['DOCUMENT_ROOT'] . '/page/404.php';
9 
10 ?>
11 
12 <div class="table-responsive p-2">
13  <table id="table-actions" class="table table-hover table-striped table-bordered table-sm text-nowrap small" style="width:100%">
14  <thead class="bg-info text-center">
15  <tr>
16  <th>ID</th>
17  <th>Запрос</th>
18  <th>Файл обработчик</th>
19  <th>Группы доступа</th>
20  <th>Группа владелец</th>
21  <th style="max-width:200px;">Комментарий</th>
22  <th data-name="Вкл / выкл" style="width:60px;"><i class="fa fa-power-off"></i></th>
23  <th data-name="Редактор кода" style="width:25px;"><i class="fa fa-file-code-o"></i></th>
24  <th data-name="Копия" style="width:25px;"><i class="fa fa-copy"></i></th>
25  <th data-name="Экспорт" style="width:25px;"><i class="fa fa-download"></i></th>
26  <th data-name="Удалить" style="width:25px;"><i class="fa fa-trash"></i></th>
27  </tr>
28  </thead>
29  </table>
30 </div>
31 <script>
32  $(function() {
33  window.dataTablesConfigs[0].ajax = '<?= Wrong\Models\Selects::find(2)->request ?>';
34  window.dataTablesConfigs[0].columnDefs = [{
35  orderable: false,
36  targets: [6, 7, 8, 9, 10]
37  }];
38  window.dataTablesConfigs[0].initComplete = function() {
39  $('#table-actions_length label').append('<button class="btn btn-outline-primary btn-sm" data-toggle="modal" data-target="#add-action" 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#actions" title="Документация" style="font-size:12px;margin-left:5px;"><i class="fa fa-question-circle"></i></button>');
40 
41  $('#table-actions_filter label').append('<button title="Фильтр" data-target="#filter" data-table="actions" 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="actions" data-callback="afterResetFilter" title="Сбросить фильтр" class="btn btn-warning btn-sm text-nowrap" style="font-size:12px;margin-left:5px;display:<?= isset($_SESSION['filter']['actions']) ? 'inline-block' : 'none' ?>;"><i class="fa fa-close"></i></button>');
42  }
43  $('#table-actions').DataTable(window.dataTablesConfigs[0]);
44  });
45 </script>
$user
Definition: from-user.php:38
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']
Definition: from-user.php:36