xref: /webtrees/resources/views/admin/users.phtml (revision 00b1984e374faddab4698e73088f0c964e529b65)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
4use Fisharebest\Webtrees\I18N;
5use Fisharebest\Webtrees\View;
6
7?>
8
9<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), $title]]) ?>
10
11<h1><?= $title ?></h1>
12
13<table class="table table-sm table-bordered table-user-list"
14    <?= view('lists/datatables-attributes') ?>
15>
16    <thead>
17        <tr>
18            <th><?= I18N::translate('Edit') ?></th>
19            <th><!-- user id --></th>
20            <th><?= I18N::translate('Username') ?></th>
21            <th><?= I18N::translate('Real name') ?></th>
22            <th><?= I18N::translate('Email address') ?></th>
23            <th><?= I18N::translate('Language') ?></th>
24            <th><!-- date registered --></th>
25            <th><?= I18N::translate('Date registered') ?></th>
26            <th><!-- last login --></th>
27            <th><?= I18N::translate('Last signed in') ?></th>
28            <th><?= I18N::translate('Verified') ?></th>
29            <th><?= I18N::translate('Approved') ?></th>
30        </tr>
31    </thead>
32    <tbody>
33    </tbody>
34</table>
35
36<?php View::push('javascript') ?>
37<script>
38  $(".table-user-list").dataTable({
39    processing:          true,
40    serverSide:          true,
41    ajax:                {
42      url: "<?= e(route('admin-users-data')) ?>"
43    },
44    autoWidth:           false,
45    sorting:             [[2, "asc"]],
46    columns:             [
47      /* details           */ {sortable: false},
48      /* user-id           */ {visible: false},
49      /* user_name         */ null,
50      /* real_name         */ null,
51      /* email             */ null,
52      /* language          */ null,
53      /* registered (sort) */ {visible: false},
54      /* registered        */ {dataSort: 6},
55      /* last_login (sort) */ {visible: false},
56      /* last_login        */ {dataSort: 8},
57      /* verified          */ null,
58      /* approved          */ null
59    ]
60  }).fnFilter("<?= e($filter) ?>"); // Pre-fill the search box
61</script>
62<?php View::endpush() ?>
63