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