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