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