xref: /webtrees/resources/views/lists/given-names-table.phtml (revision 10e0649788c8d7d4974d81c048ca2b225df8f22e)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\I18N;
6
7/**
8 * @var array<string,int>        $given_names
9 * @var array<array<int,string>> $order
10 */
11
12?>
13
14<table
15    class="table table-bordered table-sm wt-table-given-name datatables d-none"
16    <?= view('lists/datatables-attributes') ?>
17    data-info="false"
18    data-paging="false"
19    data-searching="false"
20    data-order="<?= e(json_encode($order, JSON_THROW_ON_ERROR)) ?>"
21>
22    <caption class="visually-hidden">
23        <?= I18N::translate('Given names') ?>
24    </caption>
25    <thead>
26        <tr>
27            <th>
28                <?= I18N::translate('Given name') ?>
29            </th>
30            <th>
31                <?= I18N::translate('Individuals') ?>
32            </th>
33        </tr>
34    </thead>
35    <tbody>
36        <?php foreach ($given_names as $given_name => $count) : ?>
37        <tr>
38            <td>
39                <?= e($given_name) ?>
40            </td>
41            <td>
42                <?= I18N::number($count) ?>
43            </td>
44        </tr>
45        <?php endforeach ?>
46    </tbody>
47</table>
48