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