xref: /webtrees/resources/views/modules/yahrzeit/table.phtml (revision f917a287a93831c16eb580f066d00d78ab1f25d9)
1<?php use Fisharebest\Webtrees\I18N; ?>
2
3<table
4    class="table table-sm datatable wt-table-yahrzeits"
5    data-info="false"
6    data-paging="false"
7    data-searching="false"
8    data-sorting="<?= e('[[3, "asc" ]]') ?>"
9    <?= view('lists/datatables-attributes') ?>
10>
11    <thead>
12        <tr>
13            <th><?= I18N::translate('Name') ?></th>
14            <th><?= I18N::translate('Death') ?></th>
15            <th>
16                <span title="<?= I18N::translate('Anniversary') ?>">
17                    <?= view('icons/anniversary') ?>
18                </span>
19
20            </th>
21            <th><?= I18N::translate('Yahrzeit') ?></th>
22        </tr>
23    </thead>
24    <tbody>
25
26        <?php foreach ($yahrzeits as $yahrzeit) : ?>
27            <tr>
28                <td data-sort="<?= e($yahrzeit->individual->sortName()) ?>">
29                    <a href="<?= e($yahrzeit->individual->url()) ?>">
30                        <?= $yahrzeit->individual->fullName() ?>
31                        <?php if ($yahrzeit->individual->alternateName()) : ?>
32                        <br>
33                            <?= $yahrzeit->individual->alternateName() ?>
34                        <?php endif ?>
35                    </a>
36                </td>
37                <td data-sort="<?= e($yahrzeit->fact_date->julianDay()) ?>">
38                    <?= $yahrzeit->fact_date->display(true, null, false) ?>
39                </td>
40                <td data-sort="<?= e($yahrzeit->fact->anniv) ?>">
41                    <?= I18N::number($yahrzeit->fact->anniv) ?>
42                </td>
43                <td data-sort="<?= e($yahrzeit->yahrzeit_date->julianDay()) ?>">
44                    <?= $yahrzeit->yahrzeit_date->display(true, null, false) ?>
45                </td>
46            </tr>
47        <?php endforeach ?>
48    </tbody>
49</table>
50
51<script>
52  $(".wt-table-yahrzeits").dataTable();
53</script>
54