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