xref: /webtrees/resources/views/lists/datatables-attributes.phtml (revision e873f434551745f888937263ff89e80db3b0f785)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\I18N;
6
7?>
8
9data-auto-width="false"
10data-layout="<?= e(json_encode(['topStart' => 'paging', 'topEnd' => 'search', 'bottomStart' => 'info', 'bottomEnd' => 'pageLength'], JSON_THROW_ON_ERROR)) ?>"
11data-state-save="true"
12data-length-menu="<?= e(json_encode([[10, 20, 50, 100, 500, 1000, -1], [I18N::number(10), I18N::number(20), I18N::number(50), I18N::number(100), I18N::number(500), I18N::number(1000), I18N::translate('All')]], JSON_THROW_ON_ERROR)) ?>"
13data-language="<?= e(json_encode([
14        'paginate'       => [
15            /* I18N: A button label, first page */
16            'first'    => I18N::translate('first'),
17            /* I18N: A button label, last page */
18            'last'     => I18N::translate('last'),
19            /* I18N: A button label, next page */
20            'next'     => I18N::translate('next'),
21            /* I18N: A button label, previous page */
22            'previous' => I18N::translate('previous'),
23        ],
24        'emptyTable'     => I18N::translate('No records to display'),
25        /* I18N: %s are placeholders for numbers */
26        'info'           => I18N::translate('Showing %1$s to %2$s of %3$s', '_START_', '_END_', '_TOTAL_'),
27        'infoEmpty'      => I18N::translate('Showing %1$s to %2$s of %3$s', I18N::number(0), I18N::number(0), I18N::number(0)),
28        /* I18N: %s is a number */
29        'infoFiltered'   => I18N::translate('(filtered from %s total entries)', '_MAX_'),
30        /* I18N: %s is a number of records per page */
31        'lengthMenu'     => I18N::translate('Display %s', '_MENU_'),
32        'loadingRecords' => I18N::translate('Loading…'),
33        'processing'     => I18N::translate('Calculating…'),
34        'search'         => I18N::translate('Filter'),
35        'zeroRecords'    => I18N::translate('No records to display'),
36    ], JSON_THROW_ON_ERROR)) ?>"
37