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