xref: /webtrees/resources/views/modules/yahrzeit/table.phtml (revision 10e0649788c8d7d4974d81c048ca2b225df8f22e)
1d70512abSGreg Roach<?php
2d70512abSGreg Roach
3*10e06497SGreg Roachdeclare(strict_types=1);
4*10e06497SGreg Roach
5d70512abSGreg Roachuse Fisharebest\Webtrees\I18N;
642a132ddSGreg Roachuse Illuminate\Support\Collection;
742a132ddSGreg Roach
842a132ddSGreg Roach/**
9dc270d8cSGreg Roach * @var int                    $limit_high
1001221f27SGreg Roach * @var int                    $limit_low
1136779af1SGreg Roach * @var Collection<int,object> $yahrzeits
1242a132ddSGreg Roach */
13d70512abSGreg Roach
14d70512abSGreg Roach?>
15dd6b2bfcSGreg Roach
1642a132ddSGreg Roach<div class="table-responsive">
172084f04fSGreg Roach    <table
182084f04fSGreg Roach        class="table table-sm datatable wt-table-yahrzeits"
192084f04fSGreg Roach        <?= view('lists/datatables-attributes') ?>
20dc270d8cSGreg Roach        data-paging="<?= $yahrzeits->count() >= $limit_high ? 'true' : 'false' ?>"
21e24053e5SGreg Roach        data-filter="false"
22e24053e5SGreg Roach        data-info="false"
23e24053e5SGreg Roach        data-length-change="false"
2401221f27SGreg Roach        data-page-length="<?= e($limit_low) ?>"
252084f04fSGreg Roach    >
26dd6b2bfcSGreg Roach        <thead>
27dd6b2bfcSGreg Roach            <tr>
28dd6b2bfcSGreg Roach                <th><?= I18N::translate('Name') ?></th>
29dd6b2bfcSGreg Roach                <th><?= I18N::translate('Death') ?></th>
30e39fd5c6SGreg Roach                <th>
31e39fd5c6SGreg Roach                <span title="<?= I18N::translate('Anniversary') ?>">
32e39fd5c6SGreg Roach                    <?= view('icons/anniversary') ?>
33e39fd5c6SGreg Roach                </span>
34e39fd5c6SGreg Roach
35e39fd5c6SGreg Roach                </th>
36dd6b2bfcSGreg Roach                <th><?= I18N::translate('Yahrzeit') ?></th>
37dd6b2bfcSGreg Roach            </tr>
38dd6b2bfcSGreg Roach        </thead>
39dd6b2bfcSGreg Roach        <tbody>
40dd6b2bfcSGreg Roach
41dd6b2bfcSGreg Roach            <?php foreach ($yahrzeits as $yahrzeit) : ?>
42dd6b2bfcSGreg Roach                <tr>
4339ca88baSGreg Roach                    <td data-sort="<?= e($yahrzeit->individual->sortName()) ?>">
44dd6b2bfcSGreg Roach                        <a href="<?= e($yahrzeit->individual->url()) ?>">
4539ca88baSGreg Roach                            <?= $yahrzeit->individual->fullName() ?>
4639ca88baSGreg Roach                            <?php if ($yahrzeit->individual->alternateName()) : ?>
47dd6b2bfcSGreg Roach                                <br>
4839ca88baSGreg Roach                                <?= $yahrzeit->individual->alternateName() ?>
49dd6b2bfcSGreg Roach                            <?php endif ?>
50dd6b2bfcSGreg Roach                        </a>
51dd6b2bfcSGreg Roach                    </td>
5263b8905bSGreg Roach                    <td data-sort="<?= e($yahrzeit->yahrzeit_date->julianDay()) ?>">
5366ecd017SGreg Roach                        <?= $yahrzeit->fact_date->display($yahrzeit->individual->tree()) ?>
54dd6b2bfcSGreg Roach                    </td>
55dd6b2bfcSGreg Roach                    <td data-sort="<?= e($yahrzeit->fact->anniv) ?>">
56dd6b2bfcSGreg Roach                        <?= I18N::number($yahrzeit->fact->anniv) ?>
57dd6b2bfcSGreg Roach                    </td>
58dd6b2bfcSGreg Roach                    <td data-sort="<?= e($yahrzeit->yahrzeit_date->julianDay()) ?>">
5966ecd017SGreg Roach                        <?= $yahrzeit->yahrzeit_date->display($yahrzeit->individual->tree()) ?>
60dd6b2bfcSGreg Roach                    </td>
61dd6b2bfcSGreg Roach                </tr>
62dd6b2bfcSGreg Roach            <?php endforeach ?>
63dd6b2bfcSGreg Roach        </tbody>
64dd6b2bfcSGreg Roach    </table>
6542a132ddSGreg Roach</div>
66dd6b2bfcSGreg Roach
67dd6b2bfcSGreg Roach<script>
68dd6b2bfcSGreg Roach  $(".wt-table-yahrzeits").dataTable();
69dd6b2bfcSGreg Roach</script>
70