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